[−][src]Struct efuse::Fuse
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(&self) -> 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.
fn not(self) -> Self::Output
[src]
impl Hash for Fuse
[src]
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]
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,