Struct fastrand::global_rng::RestoreOnDrop
source · struct RestoreOnDrop<'a> {
rng: &'a Cell<Rng>,
current: Rng,
}
Expand description
Make sure the original RNG is restored even on panic.
Fields§
§rng: &'a Cell<Rng>
§current: Rng
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RestoreOnDrop<'a>
impl<'a> !RefUnwindSafe for RestoreOnDrop<'a>
impl<'a> !Send for RestoreOnDrop<'a>
impl<'a> !Sync for RestoreOnDrop<'a>
impl<'a> Unpin for RestoreOnDrop<'a>
impl<'a> !UnwindSafe for RestoreOnDrop<'a>
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