pub struct ParamReturnState<T, R> { /* private fields */ }Expand description
A call’s stored parameters and the value its body last returned, held in one slot: a call that skips its body finds both with one lookup.
Implementations§
Source§impl<T, R> ParamReturnState<T, R>
impl<T, R> ParamReturnState<T, R>
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
ParamState::update_fields for the stored parameters.
pub fn value(&self) -> Option<T>where
T: Clone,
pub fn store_return(&mut self, value: R)
Trait Implementations§
Auto Trait Implementations§
impl<T, R> Freeze for ParamReturnState<T, R>
impl<T, R> RefUnwindSafe for ParamReturnState<T, R>
impl<T, R> Send for ParamReturnState<T, R>
impl<T, R> Sync for ParamReturnState<T, R>
impl<T, R> Unpin for ParamReturnState<T, R>
impl<T, R> UnsafeUnpin for ParamReturnState<T, R>
impl<T, R> UnwindSafe for ParamReturnState<T, R>
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