pub enum FlexibleResult<T, E> {
Ok(T),
Err(E),
FrameworkErr(FrameworkError),
}
Expand description
A flexible FIDL result.
Variants§
Ok(T)
The value of the flexible call when successful.
Err(E)
The error returned from a successful flexible call.
FrameworkErr(FrameworkError)
The error indicating that the flexible call failed.
Implementations§
Source§impl<T, E> FlexibleResult<T, E>
impl<T, E> FlexibleResult<T, E>
Sourcepub fn as_ref(&self) -> FlexibleResult<&T, &E>
pub fn as_ref(&self) -> FlexibleResult<&T, &E>
Converts from FlexibleResult<T, E>
to FlexibleResult<&T, &E>
.
Trait Implementations§
Source§impl<T, E> Encodable for FlexibleResult<T, E>
impl<T, E> Encodable for FlexibleResult<T, E>
Source§type Encoded = WireFlexibleResult<'static, <T as Encodable>::Encoded, <E as Encodable>::Encoded>
type Encoded = WireFlexibleResult<'static, <T as Encodable>::Encoded, <E as Encodable>::Encoded>
The wire type for the value.
Source§const COPY_OPTIMIZATION: CopyOptimization<Self, Self::Encoded> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, Self::Encoded> = _
Whether the conversion from
Self
to Self::Encoded
is equivalent to copying the raw bytes
of Self
. Read moreSource§impl<Enc, T, E> Encode<Enc> for FlexibleResult<T, E>
impl<Enc, T, E> Encode<Enc> for FlexibleResult<T, E>
Source§fn encode(
self,
encoder: &mut Enc,
out: &mut MaybeUninit<Self::Encoded>,
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut Enc, out: &mut MaybeUninit<Self::Encoded>, ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
Source§impl<Enc, T, E> EncodeRef<Enc> for FlexibleResult<T, E>
impl<Enc, T, E> EncodeRef<Enc> for FlexibleResult<T, E>
Source§fn encode_ref(
&self,
encoder: &mut Enc,
out: &mut MaybeUninit<Self::Encoded>,
) -> Result<(), EncodeError>
fn encode_ref( &self, encoder: &mut Enc, out: &mut MaybeUninit<Self::Encoded>, ) -> Result<(), EncodeError>
Encodes this reference into an encoder and output.
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.Auto Trait Implementations§
impl<T, E> Freeze for FlexibleResult<T, E>
impl<T, E> RefUnwindSafe for FlexibleResult<T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E> Send for FlexibleResult<T, E>
impl<T, E> Sync for FlexibleResult<T, E>
impl<T, E> Unpin for FlexibleResult<T, E>
impl<T, E> UnwindSafe for FlexibleResult<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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T, W> FromWireOption<WireBox<'_, W>> for Twhere
T: FromWire<W>,
impl<T, W> FromWireOption<WireBox<'_, W>> for Twhere
T: FromWire<W>,
Source§fn from_wire_option(wire: WireBox<'_, W>) -> Option<T>
fn from_wire_option(wire: WireBox<'_, W>) -> Option<T>
Converts the given
wire
to an option of this type.Source§impl<T, W> FromWireOptionRef<WireBox<'_, W>> for Twhere
T: FromWireRef<W>,
impl<T, W> FromWireOptionRef<WireBox<'_, W>> for Twhere
T: FromWireRef<W>,
Source§fn from_wire_option_ref(wire: &WireBox<'_, W>) -> Option<T>
fn from_wire_option_ref(wire: &WireBox<'_, W>) -> Option<T>
Converts the given
wire
reference to an option of this type.