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
sourceimpl 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, Error>
pub fn get(key: &str, args: CreateFilterArgs) -> Result<FilterInstance, Error>
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
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