pub struct Snapshot<T: ?Sized>(/* private fields */);Expand description
A copyable snapshot, usable in pearlite.
The Snapshot type contains the logical value of some data, in a purely immutable way.
It is zero sized.
Creating a snapshot does not move the ownership of a value.
§Pearlite syntax
In executable code, you may create a snapshot with the snapshot! macro. Inside
this macro, you may write pearlite code; this code will not run during the normal
execution of the program.
§Example
let x: Snapshot<Int> = snapshot!(1);
let m: Snapshot<Mapping<Int, Int>> = snapshot!(|x| x + 1);Implementations§
Trait Implementations§
impl<T: ?Sized> Copy for Snapshot<T>
impl<R: RA> LocalUpdate<R> for Snapshot<(R, R)>
Auto Trait Implementations§
impl<T> Freeze for Snapshot<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Snapshot<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for Snapshot<T>
impl<T> Sync for Snapshot<T>
impl<T> Unpin for Snapshot<T>
impl<T> UnsafeUnpin for Snapshot<T>where
T: ?Sized,
impl<T> UnwindSafe for Snapshot<T>where
T: UnwindSafe + ?Sized,
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