Struct critical_section::RestoreState
source · pub struct RestoreState(/* private fields */);
Expand description
Opaque “restore state”.
Implementations use this to “carry over” information between acquiring and releasing a critical section. For example, when nesting two critical sections of an implementation that disables interrupts globally, acquiring the inner one won’t disable the interrupts since they’re already disabled. The impl would use the restore state to “tell” the corresponding release that it does not have to reenable interrupts yet, only the outer release should do so.
User code uses RestoreState
opaquely, critical section implementations
use RawRestoreState
so that they can use the inner value.
Implementations§
source§impl RestoreState
impl RestoreState
Trait Implementations§
source§impl Clone for RestoreState
impl Clone for RestoreState
source§fn clone(&self) -> RestoreState
fn clone(&self) -> RestoreState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RestoreState
impl Debug for RestoreState
impl Copy for RestoreState
Auto Trait Implementations§
impl Freeze for RestoreState
impl RefUnwindSafe for RestoreState
impl Send for RestoreState
impl Sync for RestoreState
impl Unpin for RestoreState
impl UnwindSafe for RestoreState
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)