Struct interceptor::registry::Registry
source · pub struct Registry { /* private fields */ }Expand description
Registry is a collector for interceptors.
Implementations§
source§impl Registry
impl Registry
pub fn new() -> Self
sourcepub fn add(&mut self, builder: Box<dyn InterceptorBuilder + Send + Sync>)
pub fn add(&mut self, builder: Box<dyn InterceptorBuilder + Send + Sync>)
add adds a new InterceptorBuilder to the registry.
sourcepub fn build(
&self,
id: &str
) -> Result<Arc<dyn Interceptor + Send + Sync>, Error>
pub fn build(
&self,
id: &str
) -> Result<Arc<dyn Interceptor + Send + Sync>, Error>
build constructs a single Interceptor from an InterceptorRegistry