Struct WireFlexible
pub struct WireFlexible<'de, T> { /* private fields */ }
Expand description
A flexible FIDL response.
Implementations§
§impl<T> WireFlexible<'_, T>
impl<T> WireFlexible<'_, T>
pub fn is_framework_err(&self) -> bool
pub fn is_framework_err(&self) -> bool
Returns whether the flexible response is FrameworkErr
.
pub fn framework_err(&self) -> Option<FrameworkError>
pub fn framework_err(&self) -> Option<FrameworkError>
Returns the FrameworkErr
value of the response, if any.
pub fn unwrap_framework_err(&self) -> FrameworkError
pub fn unwrap_framework_err(&self) -> FrameworkError
Returns the contained FrameworkErr
value.
Panics if the response was not FrameworkErr
.
pub fn as_ref(&self) -> Flexible<&T>
pub fn as_ref(&self) -> Flexible<&T>
Returns a Flexible
of a reference to the value or framework error.
pub fn as_result(&self) -> Result<&T, FrameworkError>
pub fn as_result(&self) -> Result<&T, FrameworkError>
Returns a Result
of the Ok
value and a potential FrameworkError
.
pub fn to_flexible(self) -> Flexible<T>
pub fn to_flexible(self) -> Flexible<T>
Returns a Flexible
of an Owned
value or framework error.
Trait Implementations§
§impl<T> Debug for WireFlexible<'_, T>where
T: Debug,
impl<T> Debug for WireFlexible<'_, T>where
T: Debug,
§impl<D, T> Decode<D> for WireFlexible<'static, T>
impl<D, T> Decode<D> for WireFlexible<'static, T>
§fn decode(
slot: Slot<'_, WireFlexible<'static, T>>,
decoder: &mut D,
) -> Result<(), DecodeError>
fn decode( slot: Slot<'_, WireFlexible<'static, T>>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes a value into a slot using a decoder. Read more
§impl<T, WT> FromWire<WireFlexible<'_, WT>> for Flexible<T>where
T: FromWire<WT>,
impl<T, WT> FromWire<WireFlexible<'_, WT>> for Flexible<T>where
T: FromWire<WT>,
§fn from_wire(wire: WireFlexible<'_, WT>) -> Flexible<T>
fn from_wire(wire: WireFlexible<'_, WT>) -> Flexible<T>
Converts the given
wire
to this type.§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
§impl<T, WT> FromWireRef<WireFlexible<'_, WT>> for Flexible<T>where
T: FromWireRef<WT>,
impl<T, WT> FromWireRef<WireFlexible<'_, WT>> for Flexible<T>where
T: FromWireRef<WT>,
§fn from_wire_ref(wire: &WireFlexible<'_, WT>) -> Flexible<T>
fn from_wire_ref(wire: &WireFlexible<'_, WT>) -> Flexible<T>
Converts the given
wire
reference to this type.§impl<T> Wire for WireFlexible<'static, T>where
T: Wire,
impl<T> Wire for WireFlexible<'static, T>where
T: Wire,
§type Decoded<'de> = WireFlexible<'de, <T as Wire>::Decoded<'de>>
type Decoded<'de> = WireFlexible<'de, <T as Wire>::Decoded<'de>>
The decoded wire type, restricted to the
'de
lifetime.§fn zero_padding(out: &mut MaybeUninit<WireFlexible<'static, T>>)
fn zero_padding(out: &mut MaybeUninit<WireFlexible<'static, T>>)
Writes zeroes to the padding for this type, if any.
Auto Trait Implementations§
impl<'de, T> Freeze for WireFlexible<'de, T>
impl<'de, T> RefUnwindSafe for WireFlexible<'de, T>where
T: RefUnwindSafe,
impl<'de, T> !Send for WireFlexible<'de, T>
impl<'de, T> !Sync for WireFlexible<'de, T>
impl<'de, T> Unpin for WireFlexible<'de, T>where
T: Unpin,
impl<'de, T> !UnwindSafe for WireFlexible<'de, T>
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