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<'_, Flexible<'_, T>>,
_: <Flexible<'_, T> as Constrained>::Constraint,
) -> Result<(), ValidationError>
fn validate( _: Slot<'_, Flexible<'_, T>>, _: <Flexible<'_, T> as Constrained>::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§fn from_wire(wire: Flexible<'_, W>) -> Flexible<T>
fn from_wire(wire: Flexible<'_, W>) -> Flexible<T>
Converts the given owned value to this type.
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>) -> Flexible<T>
fn from_wire_ref(wire: &Flexible<'_, W>) -> Flexible<T>
Converts the given reference to this type.
Source§impl<T> IntoNatural for Flexible<'_, T>where
T: IntoNatural,
impl<T> IntoNatural for Flexible<'_, T>where
T: IntoNatural,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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