pub struct Captured<T: Clone>(pub T);Expand description
Capture values to use later inside Queries or Mutations, but with a catch, if the capture value changes the mutation will not recapture it because
the PartialEq implementation always returns true.
So in other words Capture(1) == Capture(5) will be true.
This is intended to use for value types that are not mean to be diffed and that are expected to maintain their value across time. Like โClientsโ of external resources such as API Clients.
Just so its clear, you might or not need this, use carefully.
Tuple Fieldsยง
ยง0: TTrait Implementationsยง
impl<T: Clone> Eq for Captured<T>
Auto Trait Implementationsยง
impl<T> Freeze for Captured<T>where
T: Freeze,
impl<T> RefUnwindSafe for Captured<T>where
T: RefUnwindSafe,
impl<T> Send for Captured<T>where
T: Send,
impl<T> Sync for Captured<T>where
T: Sync,
impl<T> Unpin for Captured<T>where
T: Unpin,
impl<T> UnwindSafe for Captured<T>where
T: UnwindSafe,
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
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<T> ComponentProps for T
impl<T> ComponentProps for T
fn changed(&self, other: &(dyn ComponentProps + 'static)) -> bool
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more