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> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Sourceยงfn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Sourceยงimpl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Sourceยงfn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Sourceยงimpl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Sourceยงfn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.