pub struct WireFlexible<'de, T> { /* private fields */ }
Expand description
A flexible FIDL response.
Implementations§
Source§impl<T> WireFlexible<'_, T>
impl<T> WireFlexible<'_, T>
Sourcepub fn is_framework_err(&self) -> bool
pub fn is_framework_err(&self) -> bool
Returns whether the flexible response is FrameworkErr
.
Sourcepub fn framework_err(&self) -> Option<FrameworkError>
pub fn framework_err(&self) -> Option<FrameworkError>
Returns the FrameworkErr
value of the response, if any.
Sourcepub 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
.
Sourcepub 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.
Sourcepub 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
.
Sourcepub 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§
Source§impl<T> Debug for WireFlexible<'_, T>where
T: Debug,
impl<T> Debug for WireFlexible<'_, T>where
T: Debug,
Source§impl<D, T> Decode<D> for WireFlexible<'static, T>
impl<D, T> Decode<D> for WireFlexible<'static, T>
Source§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>,
Source§fn from_wire(wire: WireFlexible<'_, WT>) -> Self
fn from_wire(wire: WireFlexible<'_, WT>) -> 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> FromWireRef<WireFlexible<'_, WT>> for Flexible<T>where
T: FromWireRef<WT>,
impl<T, WT> FromWireRef<WireFlexible<'_, WT>> for Flexible<T>where
T: FromWireRef<WT>,
Source§fn from_wire_ref(wire: &WireFlexible<'_, WT>) -> Self
fn from_wire_ref(wire: &WireFlexible<'_, WT>) -> Self
Converts the given
wire
reference to this type.Source§impl<T: Wire> Wire for WireFlexible<'static, T>
impl<T: Wire> Wire for WireFlexible<'static, T>
Source§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.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> Freeze for WireFlexible<'de, T>
impl<'de, T> RefUnwindSafe for WireFlexible<'de, T>where
T: RefUnwindSafe,
impl<'de, T> Send for WireFlexible<'de, T>where
T: Send,
impl<'de, T> Sync for WireFlexible<'de, T>where
T: Sync,
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