Enum avr_oxide::oserror::OxideResult
source · pub enum OxideResult<T, E> {
Ok(T),
Err(E),
}
Expand description
A type used for returning and propagating errors; this implementation
differs from core::result::Result
by having an unwrap()
implementation that doesn’t require Debug and importing a thousand
dependencies we can’t afford on AVR.
Variants§
Implementations§
Trait Implementations§
source§impl<T, E, F: From<E>> FromResidual<OxideResult<Infallible, E>> for OxideResult<T, F>
impl<T, E, F: From<E>> FromResidual<OxideResult<Infallible, E>> for OxideResult<T, F>
source§fn from_residual(residual: OxideResult<Infallible, E>) -> Self
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 moresource§impl<T, E> Residual<T> for OxideResult<Infallible, E>
impl<T, E> Residual<T> for OxideResult<Infallible, E>
§type TryType = OxideResult<T, 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>
impl<T, E> Try for OxideResult<T, E>
§type Output = T
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>
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 moresource§fn from_output(output: Self::Output) -> Self
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 moresource§fn branch(self) -> ControlFlow<Self::Residual, Self::Output>
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 moreAuto Trait Implementations§
impl<T, E> Freeze for OxideResult<T, E>
impl<T, E> RefUnwindSafe for OxideResult<T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E> Send for OxideResult<T, E>
impl<T, E> Sync for OxideResult<T, E>
impl<T, E> Unpin for OxideResult<T, E>
impl<T, E> UnwindSafe for OxideResult<T, E>where
T: UnwindSafe,
E: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more