pub struct ParamState<T> { /* private fields */ }Implementations§
Source§impl<T> ParamState<T>
impl<T> ParamState<T>
Sourcepub fn update_fields(
&mut self,
fresh: impl FnOnce() -> T,
refresh: impl FnOnce(&mut T) -> bool,
) -> bool
pub fn update_fields( &mut self, fresh: impl FnOnce() -> T, refresh: impl FnOnce(&mut T) -> bool, ) -> bool
Brings a call’s stored parameters up to date: fresh stores them on
the call’s first composition, and refresh updates each stored field
that differs and says whether any did. Unchanged fields are not
cloned again.
pub fn value(&self) -> Option<T>where
T: Clone,
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ParamState<T>
impl<T> RefUnwindSafe for ParamState<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for ParamState<T>
impl<T> Sync for ParamState<T>
impl<T> Unpin for ParamState<T>
impl<T> UnsafeUnpin for ParamState<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for ParamState<T>where
Option<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