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> Clone for WireFlexibleResult<'_, T, E>
impl<T, E> Clone for WireFlexibleResult<'_, T, E>
Source§fn clone(&self) -> WireFlexibleResult<'_, T, E>
fn clone(&self) -> WireFlexibleResult<'_, 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 WireFlexibleResult<'_, T, E>
impl<T, E> Debug for WireFlexibleResult<'_, T, E>
Source§impl<D, T, E> Decode<D> for WireFlexibleResult<'static, T, E>where
D: Decoder + ?Sized,
T: Decode<D, Constraint = ()> + Constrained,
E: Decode<D, Constraint = ()> + Constrained,
impl<D, T, E> Decode<D> for WireFlexibleResult<'static, T, E>where
D: Decoder + ?Sized,
T: Decode<D, Constraint = ()> + Constrained,
E: Decode<D, Constraint = ()> + Constrained,
Source§impl<T, E> Drop for WireFlexibleResult<'_, T, E>
impl<T, E> Drop for WireFlexibleResult<'_, T, E>
Source§impl<'a, Enc, WT, T, WE, E> Encode<WireFlexibleResult<'static, WT, WE>, Enc> for &'a FlexibleResult<T, E>
impl<'a, Enc, WT, T, WE, E> Encode<WireFlexibleResult<'static, WT, WE>, Enc> for &'a FlexibleResult<T, E>
Source§fn encode(
self,
encoder: &mut Enc,
out: &mut MaybeUninit<WireFlexibleResult<'static, WT, WE>>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut Enc, out: &mut MaybeUninit<WireFlexibleResult<'static, WT, WE>>, _: (), ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
Source§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<Enc, WT, T, WE, E> Encode<WireFlexibleResult<'static, WT, WE>, Enc> for FlexibleResult<T, E>where
Enc: Encoder + ?Sized,
WT: Constrained<Constraint = ()> + Wire,
T: Encode<WT, Enc>,
WE: Constrained<Constraint = ()> + Wire,
E: Encode<WE, Enc>,
impl<Enc, WT, T, WE, E> Encode<WireFlexibleResult<'static, WT, WE>, Enc> for FlexibleResult<T, E>where
Enc: Encoder + ?Sized,
WT: Constrained<Constraint = ()> + Wire,
T: Encode<WT, Enc>,
WE: Constrained<Constraint = ()> + Wire,
E: Encode<WE, Enc>,
Source§fn encode(
self,
encoder: &mut Enc,
out: &mut MaybeUninit<WireFlexibleResult<'static, WT, WE>>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut Enc, out: &mut MaybeUninit<WireFlexibleResult<'static, WT, WE>>, _: (), ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
Source§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
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>) -> FlexibleResult<T, E>
fn from_wire(wire: WireFlexibleResult<'_, WT, WE>) -> FlexibleResult<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, 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>) -> FlexibleResult<T, E>
fn from_wire_ref(wire: &WireFlexibleResult<'_, WT, WE>) -> FlexibleResult<T, E>
Converts the given
wire reference to this type.Source§impl<T, E> IntoNatural for WireFlexibleResult<'_, T, E>where
T: IntoNatural,
E: IntoNatural,
impl<T, E> IntoNatural for WireFlexibleResult<'_, T, E>where
T: IntoNatural,
E: IntoNatural,
Source§type Natural = FlexibleResult<<T as IntoNatural>::Natural, <E as IntoNatural>::Natural>
type Natural = FlexibleResult<<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 WireFlexibleResult<'static, T, E>
impl<T, E> Wire for WireFlexibleResult<'static, T, E>
Source§type Owned<'de> = WireFlexibleResult<'de, <T as Wire>::Owned<'de>, <E as Wire>::Owned<'de>>
type Owned<'de> = WireFlexibleResult<'de, <T as Wire>::Owned<'de>, <E as Wire>::Owned<'de>>
The owned wire type, restricted to the
'de lifetime.Source§fn zero_padding(out: &mut MaybeUninit<WireFlexibleResult<'static, T, E>>)
fn zero_padding(out: &mut MaybeUninit<WireFlexibleResult<'static, T, E>>)
Writes zeroes to the padding for this type, if any.
impl<T, E> Unconstrained for WireFlexibleResult<'_, T, E>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Constrained for Twhere
T: Unconstrained,
impl<T> Constrained for Twhere
T: Unconstrained,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
Source§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to Self