TryInjectWithKeyMut

Struct TryInjectWithKeyMut 

Source
pub struct TryInjectWithKeyMut<TKey, TSvc: ?Sized + 'static>(pub Option<KeyedRefMut<TKey, TSvc>>);
Expand description

Represents a container for an optional, mutable, injected, keyed service.

Tuple Fields§

§0: Option<KeyedRefMut<TKey, TSvc>>

Trait Implementations§

Source§

impl<TKey: Clone, TSvc: Clone + ?Sized + 'static> Clone for TryInjectWithKeyMut<TKey, TSvc>

Source§

fn clone(&self) -> TryInjectWithKeyMut<TKey, TSvc>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<TKey: Debug, TSvc: Debug + ?Sized + 'static> Debug for TryInjectWithKeyMut<TKey, TSvc>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<TKey, TSvc, S> FromRequestParts<S> for TryInjectWithKeyMut<TKey, TSvc>
where TSvc: ?Sized + 'static, S: Send + Sync,

Source§

type Rejection = Infallible

If the extractor fails it’ll use this “rejection” type. A rejection is a kind of error that can be converted into a response.
Source§

fn from_request_parts<'life0, 'life1, 'async_trait>( parts: &'life0 mut Parts, _state: &'life1 S, ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Perform the extraction.

Auto Trait Implementations§

§

impl<TKey, TSvc> Freeze for TryInjectWithKeyMut<TKey, TSvc>
where TSvc: ?Sized,

§

impl<TKey, TSvc> RefUnwindSafe for TryInjectWithKeyMut<TKey, TSvc>
where TKey: RefUnwindSafe, TSvc: ?Sized,

§

impl<TKey, TSvc> Send for TryInjectWithKeyMut<TKey, TSvc>
where TKey: Send, TSvc: Send + Sync + ?Sized,

§

impl<TKey, TSvc> Sync for TryInjectWithKeyMut<TKey, TSvc>
where TKey: Sync, TSvc: Send + Sync + ?Sized,

§

impl<TKey, TSvc> Unpin for TryInjectWithKeyMut<TKey, TSvc>
where TKey: Unpin, TSvc: ?Sized,

§

impl<TKey, TSvc> UnwindSafe for TryInjectWithKeyMut<TKey, TSvc>
where TKey: UnwindSafe, TSvc: ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<S, T> FromRequest<S, ViaParts> for T
where S: Send + Sync, T: FromRequestParts<S>,

Source§

type Rejection = <T as FromRequestParts<S>>::Rejection

If the extractor fails it’ll use this “rejection” type. A rejection is a kind of error that can be converted into a response.
Source§

fn from_request<'life0, 'async_trait>( req: Request<Body>, state: &'life0 S, ) -> Pin<Box<dyn Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Perform the extraction.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.