Struct critical_section::RestoreState
source · [−]#[repr(transparent)]pub struct RestoreState(_);
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
sourceimpl RestoreState
impl RestoreState
Trait Implementations
sourceimpl Clone for RestoreState
impl Clone for RestoreState
sourcefn clone(&self) -> RestoreState
fn clone(&self) -> RestoreState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RestoreState
impl Debug for RestoreState
impl Copy for RestoreState
Auto Trait Implementations
impl RefUnwindSafe for RestoreState
impl Send for RestoreState
impl Sync for RestoreState
impl Unpin for RestoreState
impl UnwindSafe for RestoreState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more