Trait MaybeAsVarULE

Source
pub trait MaybeAsVarULE {
    type EncodedStruct: ?Sized + VarULE;
}
Expand description

A trait that associates a VarULE type with a data struct.

Some data structs can be represented compactly as a single VarULE, such as str or a packed pattern. This trait allows for data providers to use optimizations for such types.

❗ Not all data structs benefit from this optimization. It works best when the data struct is multiplied across a large number of data marker attributes.

Both MaybeAsVarULE and [MaybeEncodeAsVarULE] should be implemented on all data structs. The data_struct! macro provides an impl.

Required Associated Types§

Source

type EncodedStruct: ?Sized + VarULE

The VarULE type for this data struct, or [()] if it cannot be represented as VarULE.

Implementations on Foreign Types§

Source§

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

Source§

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

Implementors§