Struct runtime_injector_actix::Module [−][src]
pub struct Module { /* fields omitted */ }
Expand description
A collection of providers that can be added all at once to an
InjectorBuilder
. Modules can be used to group
together related services and configure the injector in pieces rather than
all at once.
For creating a module easily via a domain specific language, see
define_module!
.
Implementations
impl Module
[src]
impl Module
[src]pub fn provide<P>(&mut self, provider: P) where
P: Provider,
[src]
pub fn provide<P>(&mut self, provider: P) where
P: Provider,
[src]Assigns the provider for a service type. Multiple providers can be registered for a service.
pub fn insert_parameter(
&mut self,
key: &str,
value: impl RequestParameter
) -> Option<Box<dyn RequestParameter + 'static, Global>>
[src]
pub fn insert_parameter(
&mut self,
key: &str,
value: impl RequestParameter
) -> Option<Box<dyn RequestParameter + 'static, Global>>
[src]Sets the of a value request parameter for requests made by the injector this module is added to. If a parameter has already been set to a value in this module, then that value is returned.
pub fn remove_parameter(
&mut self,
key: &str
) -> Option<Box<dyn RequestParameter + 'static, Global>>
[src]
pub fn remove_parameter(
&mut self,
key: &str
) -> Option<Box<dyn RequestParameter + 'static, Global>>
[src]Removes and returns the value of a parameter if it has been set.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl !UnwindSafe for Module
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Interface for T where
T: Service,
[src]
impl<T> Interface for T where
T: Service,
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> InterfaceFor<T> for T where
T: Service,
[src]
T: Service,
impl<T> Service for T where
T: Any + Send + Sync + ?Sized,
[src]
T: Any + Send + Sync + ?Sized,