Struct WireFlexibleResult
pub struct WireFlexibleResult<T, E> { /* private fields */ }
Expand description
A flexible FIDL result.
Implementations§
§impl<T, E> WireFlexibleResult<T, E>
impl<T, E> WireFlexibleResult<T, E>
pub fn is_framework_err(&self) -> bool
pub fn is_framework_err(&self) -> bool
Returns whether the flexible result is FrameworkErr
.
pub fn framework_err(&self) -> Option<FrameworkError>
pub fn framework_err(&self) -> Option<FrameworkError>
Returns the FrameworkErr
value of the result, if any.
pub fn unwrap_err(&self) -> &E
pub fn unwrap_err(&self) -> &E
Returns the contained Err
value.
Panics if the result was not Err
.
pub fn unwrap_framework_err(&self) -> FrameworkError
pub fn unwrap_framework_err(&self) -> FrameworkError
Returns the contained FrameworkErr
value.
Panics if the result was not FrameworkErr
.
pub fn as_ref(&self) -> FlexibleResult<&T, &E>
pub fn as_ref(&self) -> FlexibleResult<&T, &E>
Returns a Flexible
of a reference to the value or framework error.
pub fn as_response(&self) -> Result<&WireResult<T, E>, FrameworkError>
pub fn as_response(&self) -> Result<&WireResult<T, E>, FrameworkError>
Returns a Result
of the Ok
value and a potential FrameworkError
.
Trait Implementations§
§impl<T, E> Debug for WireFlexibleResult<T, E>
impl<T, E> Debug for WireFlexibleResult<T, E>
§impl<D, T, E> Decode<D> for WireFlexibleResult<T, E>
impl<D, T, E> Decode<D> for WireFlexibleResult<T, E>
§fn decode(
slot: Slot<'_, WireFlexibleResult<T, E>>,
decoder: &mut D,
) -> Result<(), DecodeError>
fn decode( slot: Slot<'_, WireFlexibleResult<T, E>>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes a value into a slot using a decoder. Read more
§impl<T, WT, E, WE> TakeFrom<WireFlexibleResult<WT, WE>> for FlexibleResult<T, E>
impl<T, WT, E, WE> TakeFrom<WireFlexibleResult<WT, WE>> for FlexibleResult<T, E>
§fn take_from(from: &WireFlexibleResult<WT, WE>) -> FlexibleResult<T, E>
fn take_from(from: &WireFlexibleResult<WT, WE>) -> FlexibleResult<T, E>
Converts from the given
T
, taking any resources that can’t be cloned.§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied directly during
conversion instead of calling
take_from
. Read more§impl<T, E> ZeroPadding for WireFlexibleResult<T, E>
impl<T, E> ZeroPadding for WireFlexibleResult<T, E>
§fn zero_padding(out: &mut MaybeUninit<WireFlexibleResult<T, E>>)
fn zero_padding(out: &mut MaybeUninit<WireFlexibleResult<T, E>>)
Writes zeroes to the padding for this type, if any.
Auto Trait Implementations§
impl<T, E> Freeze for WireFlexibleResult<T, E>
impl<T, E> RefUnwindSafe for WireFlexibleResult<T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E> !Send for WireFlexibleResult<T, E>
impl<T, E> !Sync for WireFlexibleResult<T, E>
impl<T, E> Unpin for WireFlexibleResult<T, E>
impl<T, E> UnwindSafe for WireFlexibleResult<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