pub struct FilterSet(_);
Expand description
A set of filters to be registered with a FilterRegistry
.
Implementations
sourceimpl FilterSet
impl FilterSet
sourcepub fn default() -> Self
pub fn default() -> Self
Returns a default set of filters which are runtime configurable and used with each endpoint.
Current default filters:
sourcepub fn default_with(filters: impl IntoIterator<Item = DynFilterFactory>) -> Self
pub fn default_with(filters: impl IntoIterator<Item = DynFilterFactory>) -> Self
Returns a FilterSet
with the filters provided through filters
in
addition to the defaults. Any filter factories provided by filters
will override any defaults with a matching name.
See FilterSet::default
for a list of the current defaults.
sourcepub fn with(filters: impl IntoIterator<Item = DynFilterFactory>) -> Self
pub fn with(filters: impl IntoIterator<Item = DynFilterFactory>) -> Self
Creates a new FilterSet
with the set of filter_factories
without
any defaults.
sourcepub fn get(&self, key: &str) -> Option<&Arc<DynFilterFactory>>
pub fn get(&self, key: &str) -> Option<&Arc<DynFilterFactory>>
Returns a DynFilterFactory
if one matches id
, otherwise returns
None
.
sourcepub fn insert(
&mut self,
value: DynFilterFactory
) -> Option<Arc<DynFilterFactory>>
pub fn insert(
&mut self,
value: DynFilterFactory
) -> Option<Arc<DynFilterFactory>>
Inserts factory for the specified FilterFactory
, returning any
previous filter stored at that location if present.
Trait Implementations
sourceimpl<I: Iterator<Item = DynFilterFactory>> From<I> for FilterSet
impl<I: Iterator<Item = DynFilterFactory>> From<I> for FilterSet
sourceimpl FromIterator<Box<dyn FilterFactory + 'static, Global>> for FilterSet
impl FromIterator<Box<dyn FilterFactory + 'static, Global>> for FilterSet
sourcefn from_iter<I: IntoIterator<Item = DynFilterFactory>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = DynFilterFactory>>(iter: I) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations
impl !RefUnwindSafe for FilterSet
impl Send for FilterSet
impl Sync for FilterSet
impl Unpin for FilterSet
impl !UnwindSafe for FilterSet
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request