pub struct Flexible<'de, T> { /* private fields */ }Expand description
A flexible FIDL result union.
Implementations§
Source§impl<T> Flexible<'_, T>
impl<T> Flexible<'_, T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the Flexible, returning the contained value.
Trait Implementations§
Source§impl<T> Constrained for Flexible<'_, T>where
T: Constrained<Constraint = ()>,
impl<T> Constrained for Flexible<'_, T>where
T: Constrained<Constraint = ()>,
Source§type Constraint = ()
type Constraint = ()
Type of constraint information for this type.
Source§fn validate(
_: Slot<'_, Self>,
_: Self::Constraint,
) -> Result<(), ValidationError>
fn validate( _: Slot<'_, Self>, _: Self::Constraint, ) -> Result<(), ValidationError>
Validate a slot of this type against a constraint. Can be called when
pointers/envelopes are just presence markers.
Source§impl<'a, E, W, T> Encode<Flexible<'static, W>, E> for &'a Flexible<T>
impl<'a, E, W, T> Encode<Flexible<'static, W>, E> for &'a Flexible<T>
Source§fn encode(
self,
encoder: &mut E,
out: &mut MaybeUninit<Flexible<'static, W>>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut E, out: &mut MaybeUninit<Flexible<'static, W>>, _: (), ) -> 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<E, W, T> Encode<Flexible<'static, W>, E> for Flexible<T>
impl<E, W, T> Encode<Flexible<'static, W>, E> for Flexible<T>
Source§fn encode(
self,
encoder: &mut E,
out: &mut MaybeUninit<Flexible<'static, W>>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut E, out: &mut MaybeUninit<Flexible<'static, W>>, _: (), ) -> 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, W> FromWire<Flexible<'_, W>> for Flexible<T>where
T: FromWire<W>,
impl<T, W> FromWire<Flexible<'_, W>> for Flexible<T>where
T: FromWire<W>,
Source§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl<T, W> FromWireRef<Flexible<'_, W>> for Flexible<T>where
T: FromWireRef<W>,
impl<T, W> FromWireRef<Flexible<'_, W>> for Flexible<T>where
T: FromWireRef<W>,
Source§fn from_wire_ref(wire: &Flexible<'_, W>) -> Self
fn from_wire_ref(wire: &Flexible<'_, W>) -> Self
Converts the given reference to this type.
Source§impl<T: IntoNatural> IntoNatural for Flexible<'_, T>
impl<T: IntoNatural> IntoNatural for Flexible<'_, T>
Source§type Natural = Flexible<<T as IntoNatural>::Natural>
type Natural = Flexible<<T 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.
Auto Trait Implementations§
impl<'de, T> Freeze for Flexible<'de, T>
impl<'de, T> RefUnwindSafe for Flexible<'de, T>where
T: RefUnwindSafe,
impl<'de, T> Send for Flexible<'de, T>where
T: Send,
impl<'de, T> Sync for Flexible<'de, T>where
T: Sync,
impl<'de, T> Unpin for Flexible<'de, T>where
T: Unpin,
impl<'de, T> UnsafeUnpin for Flexible<'de, T>
impl<'de, T> !UnwindSafe for Flexible<'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