pub struct WireFlexibleResult<'de, T, E> { /* private fields */ }
Expand description
A flexible FIDL result.
Implementations§
Source§impl<'de, T, E> WireFlexibleResult<'de, T, E>
impl<'de, T, E> WireFlexibleResult<'de, 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 FlexibleResult
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
.
Sourcepub fn as_result(&self) -> Result<Result<&T, &E>, FrameworkError>
pub fn as_result(&self) -> Result<Result<&T, &E>, FrameworkError>
Returns a nested Result
of the Ok
and Err
values, and a potential FrameworkError
.
Sourcepub fn to_flexible_result(self) -> FlexibleResult<T, E>
pub fn to_flexible_result(self) -> FlexibleResult<T, E>
Returns a FlexibleResult
of a value or framework error.
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<'static, T, E>
impl<D, T, E> Decode<D> for WireFlexibleResult<'static, T, E>
Source§impl<T, WT, E, WE> FromWire<WireFlexibleResult<'_, WT, WE>> for FlexibleResult<T, E>
impl<T, WT, E, WE> FromWire<WireFlexibleResult<'_, WT, WE>> for FlexibleResult<T, E>
Source§fn from_wire(wire: WireFlexibleResult<'_, WT, WE>) -> Self
fn from_wire(wire: WireFlexibleResult<'_, WT, WE>) -> Self
Converts the given
wire
to this type.Source§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl<T, WT, E, WE> FromWireRef<WireFlexibleResult<'_, WT, WE>> for FlexibleResult<T, E>where
T: FromWireRef<WT>,
E: FromWireRef<WE>,
impl<T, WT, E, WE> FromWireRef<WireFlexibleResult<'_, WT, WE>> for FlexibleResult<T, E>where
T: FromWireRef<WT>,
E: FromWireRef<WE>,
Source§fn from_wire_ref(wire: &WireFlexibleResult<'_, WT, WE>) -> Self
fn from_wire_ref(wire: &WireFlexibleResult<'_, WT, WE>) -> Self
Converts the given
wire
reference to this type.Source§impl<T: Wire, E: Wire> Wire for WireFlexibleResult<'static, T, E>
impl<T: Wire, E: Wire> Wire for WireFlexibleResult<'static, T, E>
Source§type Decoded<'de> = WireFlexibleResult<'de, <T as Wire>::Decoded<'de>, <E as Wire>::Decoded<'de>>
type Decoded<'de> = WireFlexibleResult<'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 WireFlexibleResult<'de, T, E>
impl<'de, T, E> RefUnwindSafe for WireFlexibleResult<'de, T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<'de, T, E> !Send for WireFlexibleResult<'de, T, E>
impl<'de, T, E> !Sync for WireFlexibleResult<'de, T, E>
impl<'de, T, E> Unpin for WireFlexibleResult<'de, T, E>
impl<'de, T, E> !UnwindSafe for WireFlexibleResult<'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