Skip to main content

AsyncKeyPathThenKp

Struct AsyncKeyPathThenKp 

Source
pub struct AsyncKeyPathThenKp<R, V2, Root, Value2, MutRoot, MutValue2, First, Second> { /* private fields */ }
Expand description

Keypath that chains an AsyncKeyPathLike (async get) with a crate::Kp (sync step). Use .get(&root).await to run.

Implementations§

Source§

impl<R, V2, Root, Value2, MutRoot, MutValue2, First, RKp, G, S> AsyncKeyPathThenKp<R, V2, Root, Value2, MutRoot, MutValue2, First, Kp<RKp, V2, First::Value, Value2, First::MutValue, MutValue2, G, S>>
where First: AsyncKeyPathLike<Root, MutRoot>, First::Value: Borrow<RKp>, First::MutValue: BorrowMut<RKp>, Value2: Borrow<V2>, MutValue2: BorrowMut<V2>, G: Fn(First::Value) -> Option<Value2>, S: Fn(First::MutValue) -> Option<MutValue2>,

Impl when Second is a Kp whose input type is First::Value (covers both Kp<First::Value, V2, …> and Kp<RKp, V2, First::Value, …>).

Source

pub async fn get(&self, root: Root) -> Option<Value2>

Get through async keypath then Kp (root is passed here).

Source

pub async fn get_mut(&self, root: MutRoot) -> Option<MutValue2>

Get mutable through async keypath then Kp (root is passed here).

Trait Implementations§

Source§

impl<R: Clone, V2: Clone, Root: Clone, Value2: Clone, MutRoot: Clone, MutValue2: Clone, First: Clone, Second: Clone> Clone for AsyncKeyPathThenKp<R, V2, Root, Value2, MutRoot, MutValue2, First, Second>

Source§

fn clone( &self, ) -> AsyncKeyPathThenKp<R, V2, Root, Value2, MutRoot, MutValue2, First, Second>

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

Auto Trait Implementations§

§

impl<R, V2, Root, Value2, MutRoot, MutValue2, First, Second> Freeze for AsyncKeyPathThenKp<R, V2, Root, Value2, MutRoot, MutValue2, First, Second>
where First: Freeze, Second: Freeze,

§

impl<R, V2, Root, Value2, MutRoot, MutValue2, First, Second> RefUnwindSafe for AsyncKeyPathThenKp<R, V2, Root, Value2, MutRoot, MutValue2, First, Second>
where First: RefUnwindSafe, Second: RefUnwindSafe, R: RefUnwindSafe, V2: RefUnwindSafe, Root: RefUnwindSafe, Value2: RefUnwindSafe, MutRoot: RefUnwindSafe, MutValue2: RefUnwindSafe,

§

impl<R, V2, Root, Value2, MutRoot, MutValue2, First, Second> Send for AsyncKeyPathThenKp<R, V2, Root, Value2, MutRoot, MutValue2, First, Second>
where First: Send, Second: Send, R: Send, V2: Send, Root: Send, Value2: Send, MutRoot: Send, MutValue2: Send,

§

impl<R, V2, Root, Value2, MutRoot, MutValue2, First, Second> Sync for AsyncKeyPathThenKp<R, V2, Root, Value2, MutRoot, MutValue2, First, Second>
where First: Sync, Second: Sync, R: Sync, V2: Sync, Root: Sync, Value2: Sync, MutRoot: Sync, MutValue2: Sync,

§

impl<R, V2, Root, Value2, MutRoot, MutValue2, First, Second> Unpin for AsyncKeyPathThenKp<R, V2, Root, Value2, MutRoot, MutValue2, First, Second>
where First: Unpin, Second: Unpin, R: Unpin, V2: Unpin, Root: Unpin, Value2: Unpin, MutRoot: Unpin, MutValue2: Unpin,

§

impl<R, V2, Root, Value2, MutRoot, MutValue2, First, Second> UnwindSafe for AsyncKeyPathThenKp<R, V2, Root, Value2, MutRoot, MutValue2, First, Second>
where First: UnwindSafe, Second: UnwindSafe, R: UnwindSafe, V2: UnwindSafe, Root: UnwindSafe, Value2: UnwindSafe, MutRoot: UnwindSafe, MutValue2: 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> 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, 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.