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§
Implementations on Foreign Types§
Source§impl MaybeAsVarULE for u16
impl MaybeAsVarULE for u16
type EncodedStruct = [()]
Source§impl<'a, K0, K1, V> MaybeAsVarULE for ZeroMap2d<'a, K0, K1, V>
Available on crate feature alloc only.
impl<'a, K0, K1, V> MaybeAsVarULE for ZeroMap2d<'a, K0, K1, V>
Available on crate feature
alloc only.type EncodedStruct = [()]
Source§impl<'a, K0, V> MaybeAsVarULE for ZeroMap<'a, K0, V>
Available on crate feature alloc only.
impl<'a, K0, V> MaybeAsVarULE for ZeroMap<'a, K0, V>
Available on crate feature
alloc only.