[][src]Struct efuse::Fuse

pub struct Fuse { /* fields omitted */ }

Software fuse, with custom initial state.

Default constructor uses false as the initial state.

Methods

impl Fuse[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(&mut self) -> bool[src]

Zap this fuse (unconditionally), toggling its value permanently.

It returns the new value of this fuse.

pub fn zap_once(&mut 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 Fuse[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Fuse[src]

impl From<bool> for Fuse[src]

impl Into<bool> for Fuse[src]

impl PartialEq<Fuse> for Fuse[src]

impl Copy for Fuse[src]

impl Eq for Fuse[src]

impl Debug for Fuse[src]

impl Not for Fuse[src]

type Output = bool

The resulting type after applying the ! operator.

impl Hash for Fuse[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

impl Sync for Fuse

impl Send for Fuse

impl Unpin for Fuse

impl RefUnwindSafe for Fuse

impl UnwindSafe for Fuse

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]