Type Alias avr_oxide::util::persist::PersistenceResult

source ·
pub type PersistenceResult<T> = OxideResult<T, PersistenceError>;

Aliased Type§

enum PersistenceResult<T> {
    Ok(T),
    Err(PersistenceError),
}

Variants§

Implementations

source§

impl<T, E> OxideResult<T, E>

source

pub const fn is_ok(&self) -> bool

source

pub const fn is_err(&self) -> bool

source

pub fn unwrap(self) -> T

source

pub fn expect_err(self) -> E

source

pub fn unwrap_or(self, default: T) -> T

source

pub fn unwrap_or_else<F: FnOnce(E) -> T>(self, op: F) -> T

Trait Implementations

source§

impl<T: Debug, E: Debug> Debug for OxideResult<T, E>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T, E, F: From<E>> FromResidual<OxideResult<Infallible, E>> for OxideResult<T, F>

source§

fn from_residual(residual: OxideResult<Infallible, E>) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
source§

impl<T, E> Residual<T> for OxideResult<Infallible, E>

§

type TryType = OxideResult<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
source§

impl<T, E> Try for OxideResult<T, E>

§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
§

type Residual = OxideResult<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual as part of ? when short-circuiting. Read more
source§

fn from_output(output: Self::Output) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
source§

fn branch(self) -> ControlFlow<Self::Residual, Self::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value (because this returned ControlFlow::Continue) or propagate a value back to the caller (because this returned ControlFlow::Break). Read more