Struct pinned_init::ChainInit

source ·
pub struct ChainInit<I, F, T: ?Sized, E>(/* private fields */);
Expand description

An initializer returned by Init::chain.

Trait Implementations§

source§

impl<T: ?Sized, E, I, F> Init<T, E> for ChainInit<I, F, T, E>
where I: Init<T, E>, F: FnOnce(&mut T) -> Result<(), E>,

source§

unsafe fn __init(self, slot: *mut T) -> Result<(), E>

Initializes slot. Read more
source§

fn chain<F>(self, f: F) -> ChainInit<Self, F, T, E>
where F: FnOnce(&mut T) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
source§

impl<T: ?Sized, E, I, F> PinInit<T, E> for ChainInit<I, F, T, E>
where I: Init<T, E>, F: FnOnce(&mut T) -> Result<(), E>,

source§

unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E>

Initializes slot. Read more
source§

fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>
where F: FnOnce(Pin<&mut T>) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more

Auto Trait Implementations§

§

impl<I, F, T, E> Freeze for ChainInit<I, F, T, E>
where I: Freeze, F: Freeze, T: ?Sized,

§

impl<I, F, T, E> RefUnwindSafe for ChainInit<I, F, T, E>
where I: RefUnwindSafe, F: RefUnwindSafe, T: ?Sized,

§

impl<I, F, T, E> Send for ChainInit<I, F, T, E>
where I: Send, F: Send, T: ?Sized,

§

impl<I, F, T, E> Sync for ChainInit<I, F, T, E>
where I: Sync, F: Sync, T: ?Sized,

§

impl<I, F, T, E> Unpin for ChainInit<I, F, T, E>
where I: Unpin, F: Unpin, T: ?Sized,

§

impl<I, F, T, E> UnwindSafe for ChainInit<I, F, T, E>
where I: UnwindSafe, F: UnwindSafe, T: ?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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, E> Init<T, E> for T

source§

unsafe fn __init(self, slot: *mut T) -> Result<(), E>

Initializes slot. Read more
source§

fn chain<F>(self, f: F) -> ChainInit<Self, F, T, E>
where F: FnOnce(&mut T) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
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, E> PinInit<T, E> for T

source§

unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E>

Initializes slot. Read more
source§

fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>
where F: FnOnce(Pin<&mut T>) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
source§

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

§

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>,

§

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.