pub struct WireResult<'de, T, E> { /* private fields */ }
Expand description
A FIDL result union.
Implementations§
Source§impl<T, E> WireResult<'_, T, E>
impl<T, E> WireResult<'_, T, E>
Sourcepub fn unwrap_err(&self) -> &E
pub fn unwrap_err(&self) -> &E
Returns the contained Err
value.
Panics if the result was not Err
.
Sourcepub fn into_result(self) -> Result<T, E>
pub fn into_result(self) -> Result<T, E>
Returns a Result
of the owned value or error.
Trait Implementations§
Source§impl<T, E> Clone for WireResult<'_, T, E>
impl<T, E> Clone for WireResult<'_, T, E>
Source§fn clone(&self) -> WireResult<'_, T, E>
fn clone(&self) -> WireResult<'_, T, E>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T, E> Debug for WireResult<'_, T, E>
impl<T, E> Debug for WireResult<'_, T, E>
Source§impl<D, T, E> Decode<D> for WireResult<'static, T, E>
impl<D, T, E> Decode<D> for WireResult<'static, T, E>
Source§fn decode(
slot: Slot<'_, WireResult<'static, T, E>>,
decoder: &mut D,
) -> Result<(), DecodeError>
fn decode( slot: Slot<'_, WireResult<'static, T, E>>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes a value into a slot using a decoder. Read more
Source§impl<T, E> Drop for WireResult<'_, T, E>
impl<T, E> Drop for WireResult<'_, T, E>
Source§impl<T, E, WT, WE> FromWire<WireResult<'_, WT, WE>> for Result<T, E>
impl<T, E, WT, WE> FromWire<WireResult<'_, WT, WE>> for Result<T, E>
Source§fn from_wire(wire: WireResult<'_, WT, WE>) -> Result<T, E>
fn from_wire(wire: WireResult<'_, WT, WE>) -> Result<T, E>
Converts the given
wire
to this type.Source§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl<T, E, WT, WE> FromWireRef<WireResult<'_, WT, WE>> for Result<T, E>where
T: FromWireRef<WT>,
E: FromWireRef<WE>,
impl<T, E, WT, WE> FromWireRef<WireResult<'_, WT, WE>> for Result<T, E>where
T: FromWireRef<WT>,
E: FromWireRef<WE>,
Source§fn from_wire_ref(wire: &WireResult<'_, WT, WE>) -> Result<T, E>
fn from_wire_ref(wire: &WireResult<'_, WT, WE>) -> Result<T, E>
Converts the given
wire
reference to this type.Source§impl<T, E> IntoNatural for WireResult<'_, T, E>where
T: IntoNatural,
E: IntoNatural,
impl<T, E> IntoNatural for WireResult<'_, T, E>where
T: IntoNatural,
E: IntoNatural,
Source§type Natural = Result<<T as IntoNatural>::Natural, <E as IntoNatural>::Natural>
type Natural = Result<<T as IntoNatural>::Natural, <E as IntoNatural>::Natural>
A good default type for this wire type to convert into.
Source§fn into_natural(self) -> Self::Natural
fn into_natural(self) -> Self::Natural
Converts this type into its natural equivalent.
Source§impl<T, E> Wire for WireResult<'static, T, E>
impl<T, E> Wire for WireResult<'static, T, E>
Source§type Decoded<'de> = WireResult<'de, <T as Wire>::Decoded<'de>, <E as Wire>::Decoded<'de>>
type Decoded<'de> = WireResult<'de, <T as Wire>::Decoded<'de>, <E as Wire>::Decoded<'de>>
The decoded wire type, restricted to the
'de
lifetime.Source§fn zero_padding(out: &mut MaybeUninit<WireResult<'static, T, E>>)
fn zero_padding(out: &mut MaybeUninit<WireResult<'static, T, E>>)
Writes zeroes to the padding for this type, if any.
Auto Trait Implementations§
impl<'de, T, E> Freeze for WireResult<'de, T, E>
impl<'de, T, E> RefUnwindSafe for WireResult<'de, T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<'de, T, E> Send for WireResult<'de, T, E>
impl<'de, T, E> Sync for WireResult<'de, T, E>
impl<'de, T, E> Unpin for WireResult<'de, T, E>
impl<'de, T, E> !UnwindSafe for WireResult<'de, T, E>
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