Skip to main content

With

Struct With 

Source
pub struct With<F, T>(/* private fields */);
Expand description

Builds one storage plan while carrying an adjacent owned value.

Implementations§

Source§

impl<F, T> With<F, T>

Source

pub const fn new(plan: F, value: T) -> Self

Trait Implementations§

Source§

impl<F, T> Build for With<F, T>
where F: Build,

Source§

type Error = <F as Build>::Error

Source§

type Store<'d> = <F as Build>::Store<'d>
where Self: 'd,

Source§

fn try_store<'d>(&self) -> Result<Self::Store<'d>, Self::Error>
where Self: 'd,

Source§

fn try_build<'p, 'd>( self, store: &'p mut Self::Store<'d>, ctx: Context<'_, 'd>, ) -> Result<Self::Output<'p, 'd>, Self::Error>
where Self: 'd, 'd: 'p,

Source§

impl<F: Claimless, T> Claimless for With<F, T>

Source§

impl<F: Direct, T> Direct for With<F, T>

Source§

fn build<'p, 'd>(self) -> Self::Output<'p, 'd>
where Self: 'd, 'd: 'p,

Source§

impl<F, T> Plan for With<F, T>
where F: Plan,

Source§

type Output<'p, 'd> = (<F as Plan>::Output<'p, 'd>, T)
where Self: 'd, 'd: 'p,

Source§

impl<F, T> Resource for With<F, T>
where F: Resource,

Source§

fn include_in(&self, needs: Needs) -> Result<Needs, Claim>

Auto Trait Implementations§

§

impl<F, T> Freeze for With<F, T>
where (F, T): Freeze,

§

impl<F, T> RefUnwindSafe for With<F, T>

§

impl<F, T> Send for With<F, T>
where (F, T): Send,

§

impl<F, T> Sync for With<F, T>
where (F, T): Sync,

§

impl<F, T> Unpin for With<F, T>
where (F, T): Unpin,

§

impl<F, T> UnsafeUnpin for With<F, T>

§

impl<F, T> UnwindSafe for With<F, T>

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

Source§

fn into(self) -> T

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<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.