pub struct FilterSet(/* private fields */);
Expand description
A set of filters to be registered with a FilterRegistry
.
Current default filters:
Implementations§
source§impl FilterSet
impl FilterSet
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.
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§
source§impl FromIterator<Box<dyn FilterFactory>> for FilterSet
impl FromIterator<Box<dyn FilterFactory>> for FilterSet
source§fn 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request