pub struct TryRaw<F, T: ?Sized, E>(/* private fields */);Expand description
Initializes a place with a closure that has full control.
This initializer is created from try_raw() factory function.
Trait Implementations§
Source§impl<T: ?Sized, F, E> InitPin<T> for TryRaw<F, T, E>
impl<T: ?Sized, F, E> InitPin<T> for TryRaw<F, T, E>
Source§fn init_pin<'a, 'b>(
self,
place: Uninit<'a, T>,
slot: DropSlot<'a, 'b, T>,
) -> InitPinResult<'a, 'b, T, E>
fn init_pin<'a, 'b>( self, place: Uninit<'a, T>, slot: DropSlot<'a, 'b, T>, ) -> InitPinResult<'a, 'b, T, E>
Initializes a place with a pinned value. Read more
Source§fn and_pin<F: FnOnce(Pin<&mut T>)>(self, f: F) -> AndPin<Self, F>
fn and_pin<F: FnOnce(Pin<&mut T>)>(self, f: F) -> AndPin<Self, F>
Chains a closure to execute after successful initialization with a
pinned reference. Read more
Source§fn or<M, I2>(self, other: I2) -> Or<Self, I2, M>
fn or<M, I2>(self, other: I2) -> Or<Self, I2, M>
Provides a fallback initializer if this one fails. Read more
Source§fn or_else<F, I2>(self, f: F) -> OrElse<Self, F>
fn or_else<F, I2>(self, f: F) -> OrElse<Self, F>
Provides a fallback initializer based on the error from this one. Read more
Source§fn unwrap_or<M, I2>(self, other: I2) -> UnwrapOr<Self, I2, M>where
I2: IntoInitPin<T, M, Error = Infallible>,
fn unwrap_or<M, I2>(self, other: I2) -> UnwrapOr<Self, I2, M>where
I2: IntoInitPin<T, M, Error = Infallible>,
Provides a fallback initializer if the primary one fails. The fallback
initializer must be infallible. Read more
Source§fn unwrap_or_else<F, I2>(self, f: F) -> UnwrapOrElse<Self, F>
fn unwrap_or_else<F, I2>(self, f: F) -> UnwrapOrElse<Self, F>
Provides a fallback initializer computed from the error of the primary
one. The fallback initializer must be infallible. Read more
Source§impl<T: ?Sized, F, E> Initializer for TryRaw<F, T, E>
impl<T: ?Sized, F, E> Initializer for TryRaw<F, T, E>
Source§fn map_err<F, E2>(self, f: F) -> MapErr<Self, F>
fn map_err<F, E2>(self, f: F) -> MapErr<Self, F>
Maps the error type of the initializer using a closure. Read more
Source§fn adapt_err<E2>(self) -> MapErr<Self, impl FnOnce(Self::Error) -> E2>where
Self: Initializer<Error = Infallible>,
fn adapt_err<E2>(self) -> MapErr<Self, impl FnOnce(Self::Error) -> E2>where
Self: Initializer<Error = Infallible>,
Adapts an infallible initializer to have a different error type. Read more
impl<F, T: ?Sized, E> StructuralPartialEq for TryRaw<F, T, E>
Auto Trait Implementations§
impl<F, T, E> Freeze for TryRaw<F, T, E>
impl<F, T, E> RefUnwindSafe for TryRaw<F, T, E>where
F: RefUnwindSafe,
T: ?Sized,
impl<F, T, E> Send for TryRaw<F, T, E>
impl<F, T, E> Sync for TryRaw<F, T, E>
impl<F, T, E> Unpin for TryRaw<F, T, E>
impl<F, T, E> UnwindSafe for TryRaw<F, T, E>where
F: UnwindSafe,
T: ?Sized,
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