pub struct RestoreState(/* private fields */);Expand description
What release needs to put back: whether interrupts were enabled.
Implementations§
Source§impl RestoreState
impl RestoreState
Sourcepub fn was_enabled(self) -> bool
pub fn was_enabled(self) -> bool
Whether the section this closes found interrupts enabled.
Sourcepub fn from_enabled(enabled: bool) -> Self
pub fn from_enabled(enabled: bool) -> Self
Rebuild a state saved as a bool (the critical-section crate’s
restore-state-bool representation).
Passing it to release carries the same contract as the original.
Trait Implementations§
Source§impl Clone for RestoreState
impl Clone for RestoreState
Source§fn clone(&self) -> RestoreState
fn clone(&self) -> RestoreState
Returns a duplicate of the value. Read more
1.0.0§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
Source§impl PartialEq for RestoreState
impl PartialEq for RestoreState
impl Copy for RestoreState
impl Eq for RestoreState
impl StructuralPartialEq 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 UnsafeUnpin for RestoreState
impl UnwindSafe for RestoreState
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)