Struct quilkin::filters::FilterRegistry
source · pub struct FilterRegistry;
Expand description
Registry of all Filter
s that can be applied in the system.
Note: Cloning FilterRegistry
, clones a new reference to the data and
does not clone the data itself. In other words the clone is “shallow” and
not deep.
Implementations§
source§impl FilterRegistry
impl FilterRegistry
sourcepub fn register(factories: impl IntoIterator<Item = DynFilterFactory>)
pub fn register(factories: impl IntoIterator<Item = DynFilterFactory>)
Loads the provided FilterSet
into the registry of available filters.
sourcepub fn get(
key: &str,
args: CreateFilterArgs
) -> Result<FilterInstance, CreationError>
pub fn get( key: &str, args: CreateFilterArgs ) -> Result<FilterInstance, CreationError>
Creates and returns a new dynamic instance of Filter
for a given
key
. Errors if the filter cannot be found, or if there is a
configuration issue.
sourcepub fn get_factory(key: &str) -> Option<Arc<DynFilterFactory>>
pub fn get_factory(key: &str) -> Option<Arc<DynFilterFactory>>
Returns a DynFilterFactory
for a given key
. Returning None
if the
factory cannot be found.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for FilterRegistry
impl Send for FilterRegistry
impl Sync for FilterRegistry
impl Unpin for FilterRegistry
impl UnwindSafe for FilterRegistry
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