Struct runtime_injector_actix::InterfaceProvider [−][src]
pub struct InterfaceProvider<I, P> where
P: TypedProvider,
I: InterfaceFor<<P as TypedProvider>::Result> + ?Sized, { /* fields omitted */ }
Expand description
Provides a service as an implementation of an interface. See
TypedProvider::with_interface()
for more information.
Trait Implementations
impl<I, P> Provider for InterfaceProvider<I, P> where
P: TypedProvider,
I: InterfaceFor<<P as TypedProvider>::Result> + ?Sized,
[src]
impl<I, P> Provider for InterfaceProvider<I, P> where
P: TypedProvider,
I: InterfaceFor<<P as TypedProvider>::Result> + ?Sized,
[src]pub fn result(&self) -> ServiceInfo
[src]
pub fn result(&self) -> ServiceInfo
[src]The ServiceInfo
which describes the type returned by this provider.
pub fn provide(
&mut self,
injector: &Injector,
request_info: &RequestInfo
) -> Result<Arc<dyn Any + 'static + Sync + Send>, InjectError>
[src]
pub fn provide(
&mut self,
injector: &Injector,
request_info: &RequestInfo
) -> Result<Arc<dyn Any + 'static + Sync + Send>, InjectError>
[src]Provides an instance of the service.
pub fn provide_owned(
&mut self,
injector: &Injector,
request_info: &RequestInfo
) -> Result<Box<dyn Any + 'static + Sync + Send, Global>, InjectError>
[src]
pub fn provide_owned(
&mut self,
injector: &Injector,
request_info: &RequestInfo
) -> Result<Box<dyn Any + 'static + Sync + Send, Global>, InjectError>
[src]Provides an owned instance of the service.
Auto Trait Implementations
impl<I: ?Sized, P> RefUnwindSafe for InterfaceProvider<I, P> where
P: RefUnwindSafe,
P: RefUnwindSafe,
impl<I: ?Sized, P> Send for InterfaceProvider<I, P>
impl<I: ?Sized, P> Sync for InterfaceProvider<I, P>
impl<I: ?Sized, P> Unpin for InterfaceProvider<I, P> where
P: Unpin,
P: Unpin,
impl<I: ?Sized, P> UnwindSafe for InterfaceProvider<I, P> where
P: UnwindSafe,
P: UnwindSafe,
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,