MappedGuard

Struct MappedGuard 

Source
pub struct MappedGuard<G, R> { /* private fields */ }

Implementations§

Source§

impl<G, R> MappedGuard<G, R>

Source

pub fn new(guard: G, target: R) -> Self

Trait Implementations§

Source§

impl<G: Debug, R: Debug> Debug for MappedGuard<G, R>

Source§

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

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

impl<G, R: Deref> Deref for MappedGuard<G, R>

Source§

type Target = <R as Deref>::Target

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<G, R1, R> From<MappedGuard<MappedGuard<G, R1>, R>> for MappedGuard<G, R>

Source§

fn from(from: MappedGuard<MappedGuard<G, R1>, R>) -> Self

Flattens nested MappedGuard instances.

Source§

impl<G, R> BoxedMapped for MappedGuard<G, R>

Auto Trait Implementations§

§

impl<G, R> Freeze for MappedGuard<G, R>
where G: Freeze, R: Freeze,

§

impl<G, R> RefUnwindSafe for MappedGuard<G, R>

§

impl<G, R> Send for MappedGuard<G, R>
where G: Send, R: Send,

§

impl<G, R> Sync for MappedGuard<G, R>
where G: Sync, R: Sync,

§

impl<G, R> Unpin for MappedGuard<G, R>
where G: Unpin, R: Unpin,

§

impl<G, R> UnwindSafe for MappedGuard<G, R>
where G: UnwindSafe, R: UnwindSafe,

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<'a, G, R> MapGuard<'a, Box<G>, &'a G, R> for G
where G: BoxedMapped + 'a, R: 'a,

Source§

fn map_guard(self, map: impl FnOnce(&'a G) -> R) -> MappedGuard<Box<G>, R>

Source§

fn maybe_map_guard( self, maybe_map: impl FnOnce(&'a G) -> Option<R>, ) -> Option<MappedGuard<Box<G>, R>>

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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.
Source§

impl<'a, G, R, E> TryMapGuard<'a, Box<G>, &'a G, R, E> for G
where G: BoxedMapped + 'a, R: 'a, E: 'a,

Source§

fn try_map_guard( self, try_map: impl FnOnce(&'a G) -> Result<R, E>, ) -> Result<MappedGuard<Box<G>, R>, E>