Skip to main content

MaybeEncodeAsVarULE

Trait MaybeEncodeAsVarULE 

Source
pub trait MaybeEncodeAsVarULE: MaybeAsVarULE {
    type EncodeableStruct<'a>: EncodeAsVarULE<Self::EncodedStruct>
       where Self: 'a;

    // Required method
    fn maybe_as_encodeable<'a>(&'a self) -> Option<Self::EncodeableStruct<'a>>;
}
Expand description

Export-only trait associated with MaybeAsVarULE. See that trait for additional details.

Enabled with the export Cargo feature.

Required Associated Types§

Source

type EncodeableStruct<'a>: EncodeAsVarULE<Self::EncodedStruct> where Self: 'a

The type returned by Self::maybe_as_encodeable.

Required Methods§

Source

fn maybe_as_encodeable<'a>(&'a self) -> Option<Self::EncodeableStruct<'a>>

Returns something encodeable to the MaybeAsVarULE::EncodedStruct that represents this data struct, or None if the data struct does not support this representation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl MaybeEncodeAsVarULE for u16

Available on crate feature export only.
Source§

type EncodeableStruct<'a> = &'a [()] where Self: 'a

Source§

fn maybe_as_encodeable<'a>(&'a self) -> Option<Self::EncodeableStruct<'a>>

Source§

impl<'a, K0, K1, V> MaybeEncodeAsVarULE for ZeroMap2d<'a, K0, K1, V>
where K0: ZeroMapKV<'a> + ?Sized, K1: ZeroMapKV<'a> + ?Sized, V: ZeroMapKV<'a> + ?Sized,

Available on crate features alloc and export only.
Source§

type EncodeableStruct<'b> = &'b [()] where Self: 'b

Source§

fn maybe_as_encodeable<'b>(&'b self) -> Option<Self::EncodeableStruct<'b>>

Source§

impl<'a, K0, V> MaybeEncodeAsVarULE for ZeroMap<'a, K0, V>
where K0: ZeroMapKV<'a> + ?Sized, V: ZeroMapKV<'a> + ?Sized,

Available on crate features alloc and export only.
Source§

type EncodeableStruct<'b> = &'b [()] where Self: 'b

Source§

fn maybe_as_encodeable<'b>(&'b self) -> Option<Self::EncodeableStruct<'b>>

Source§

impl<'a, V: VarULE + ?Sized> MaybeEncodeAsVarULE for VarZeroCow<'a, V>

Available on crate feature export only.
Source§

type EncodeableStruct<'b> = &'b V where Self: 'b

Source§

fn maybe_as_encodeable<'b>(&'b self) -> Option<Self::EncodeableStruct<'b>>

Source§

impl<T, const N: usize> MaybeEncodeAsVarULE for [T; N]

Available on crate feature export only.
Source§

type EncodeableStruct<'a> = &'a [()] where Self: 'a

Source§

fn maybe_as_encodeable<'a>(&'a self) -> Option<Self::EncodeableStruct<'a>>

Implementors§

Source§

impl<'data> MaybeEncodeAsVarULE for HelloWorld<'data>

Available on crate feature export only.
Source§

type EncodeableStruct<'b> = &'b str where Self: 'b