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> 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§impl<T, E, WT, WE> From<WireResult<'_, WT, WE>> for Result<T, E>
impl<T, E, WT, WE> From<WireResult<'_, WT, WE>> for Result<T, E>
Source§fn from(from: WireResult<'_, WT, WE>) -> Self
fn from(from: WireResult<'_, WT, WE>) -> Self
Converts to this type from the input type.
Source§impl<T: Wire, E: Wire> Wire for WireResult<'static, T, E>
impl<T: Wire, E: Wire> 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<Self>)
fn zero_padding(out: &mut MaybeUninit<Self>)
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