pub struct WireFlexibleResult<T, E> { /* private fields */ }
Expand description
A flexible FIDL result.
Implementations§
Source§impl<T, E> WireFlexibleResult<T, E>
impl<T, E> WireFlexibleResult<T, E>
Sourcepub fn is_framework_err(&self) -> bool
pub fn is_framework_err(&self) -> bool
Returns whether the flexible result is FrameworkErr
.
Sourcepub fn framework_err(&self) -> Option<FrameworkError>
pub fn framework_err(&self) -> Option<FrameworkError>
Returns the FrameworkErr
value of the result, if any.
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 unwrap_framework_err(&self) -> FrameworkError
pub fn unwrap_framework_err(&self) -> FrameworkError
Returns the contained FrameworkErr
value.
Panics if the result was not FrameworkErr
.
Sourcepub 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.
Sourcepub 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§
Source§impl<T, E> Debug for WireFlexibleResult<T, E>
impl<T, E> Debug for WireFlexibleResult<T, E>
Source§impl<D, T, E> Decode<D> for WireFlexibleResult<T, E>
impl<D, T, E> Decode<D> for WireFlexibleResult<T, E>
Source§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>
Source§fn take_from(from: &WireFlexibleResult<WT, WE>) -> Self
fn take_from(from: &WireFlexibleResult<WT, WE>) -> Self
Converts from the given
T
, taking any resources that can’t be cloned.Source§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 moreSource§impl<T, E> ZeroPadding for WireFlexibleResult<T, E>
impl<T, E> ZeroPadding for WireFlexibleResult<T, E>
Source§unsafe fn zero_padding(ptr: *mut Self)
unsafe fn zero_padding(ptr: *mut Self)
Writes zeroes to the padding for this type, if any. Read more
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