[−][src]Struct efuse::AtomicFuse
Atomic software fuse, with custom initial state.
Default constructor uses false
as the initial state.
Methods
impl AtomicFuse
[src]
pub fn new(initial_state: bool) -> Self
[src]
Return a new fuse with the given initial state.
pub fn initial_state(&self) -> bool
[src]
Return the initial state of this fuse.
pub fn as_bool(&self) -> bool
[src]
Return current fuse value as a boolean.
pub fn zap(&self) -> bool
[src]
Zap this fuse (unconditionally), toggling its value permanently.
It returns the new value of this fuse.
pub fn zap_once(&self) -> Result<bool, AlreadyZappedError>
[src]
Zap this fuse (conditionally), toggling its value permanently.
If the fuse was already previously zapped, it returns an
AlreadyZappedError
error.
Otherwise, it returns the new value of this fuse.
pub fn is_zapped(&self) -> bool
[src]
Whether this fuse has already been zapped.
Trait Implementations
impl Clone for AtomicFuse
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for AtomicFuse
[src]
fn default() -> AtomicFuse
[src]
impl From<bool> for AtomicFuse
[src]
impl Into<bool> for AtomicFuse
[src]
impl PartialEq<AtomicFuse> for AtomicFuse
[src]
fn eq(&self, other: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for AtomicFuse
[src]
impl Debug for AtomicFuse
[src]
impl Not for AtomicFuse
[src]
type Output = bool
The resulting type after applying the !
operator.
fn not(self) -> Self::Output
[src]
impl Hash for AtomicFuse
[src]
Auto Trait Implementations
impl Sync for AtomicFuse
impl Send for AtomicFuse
impl Unpin for AtomicFuse
impl RefUnwindSafe for AtomicFuse
impl UnwindSafe for AtomicFuse
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,