[][src]Struct efuse::AtomicFuse

pub struct AtomicFuse { /* fields omitted */ }

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_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for AtomicFuse[src]

impl From<bool> for AtomicFuse[src]

impl Into<bool> for AtomicFuse[src]

impl PartialEq<AtomicFuse> for AtomicFuse[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.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.

impl Hash for AtomicFuse[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]