Struct runtime_injector_actix::InjectorBuilder [−][src]
pub struct InjectorBuilder { /* fields omitted */ }
Expand description
A builder for an Injector
.
Implementations
impl InjectorBuilder
[src]
impl InjectorBuilder
[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 add_provider(&mut self, provider: Box<dyn Provider + 'static, Global>)
[src]
pub fn add_provider(&mut self, provider: Box<dyn Provider + 'static, Global>)
[src]Adds a provider to the injector.
pub fn remove_providers(
&mut self,
service_info: ServiceInfo
) -> Option<Vec<Box<dyn Provider + 'static, Global>, Global>>
[src]
pub fn remove_providers(
&mut self,
service_info: ServiceInfo
) -> Option<Vec<Box<dyn Provider + 'static, Global>, Global>>
[src]Removes all providers for a service type.
#[must_use]pub fn root_info(&self) -> &RequestInfo
[src]
#[must_use]pub fn root_info(&self) -> &RequestInfo
[src]Borrows the root RequestInfo
that will be used by calls to
Injector::get()
.
#[must_use]pub fn root_info_mut(&mut self) -> &mut RequestInfo
[src]
#[must_use]pub fn root_info_mut(&mut self) -> &mut RequestInfo
[src]Mutably borrows the root RequestInfo
that will be used by calls to
Injector::get()
.
pub fn add_module(&mut self, module: Module)
[src]
pub fn add_module(&mut self, module: Module)
[src]Adds all the providers registered in a module. This may cause multiple providers to be registered for the same service.
If any conflicting request parameters have been set before adding this module, they are overridden.
Trait Implementations
impl Default for InjectorBuilder
[src]
impl Default for InjectorBuilder
[src]pub fn default() -> InjectorBuilder
[src]
pub fn default() -> InjectorBuilder
[src]Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for InjectorBuilder
impl Send for InjectorBuilder
impl Sync for InjectorBuilder
impl Unpin for InjectorBuilder
impl !UnwindSafe for InjectorBuilder
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,