pub struct ServiceInstance<I, S> { /* private fields */ }
Expand description
A strongly typed service instance.
Implementations§
Source§impl<I, S> ServiceInstance<I, S>
impl<I, S> ServiceInstance<I, S>
Sourcepub fn from_untyped(instance: I) -> Self
pub fn from_untyped(instance: I) -> Self
Returns a new service instance over the given instance.
Sourcepub fn into_untyped(self) -> I
pub fn into_untyped(self) -> I
Returns the underlying instance.
Sourcepub fn as_untyped_mut(&mut self) -> &mut I
pub fn as_untyped_mut(&mut self) -> &mut I
Returns a reference to the underlying instance.
Trait Implementations§
Auto Trait Implementations§
impl<I, S> Freeze for ServiceInstance<I, S>where
I: Freeze,
impl<I, S> RefUnwindSafe for ServiceInstance<I, S>where
I: RefUnwindSafe,
S: RefUnwindSafe,
impl<I, S> Send for ServiceInstance<I, S>
impl<I, S> Sync for ServiceInstance<I, S>
impl<I, S> Unpin for ServiceInstance<I, S>
impl<I, S> UnwindSafe for ServiceInstance<I, S>where
I: UnwindSafe,
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more