Trait flatdata::VariadicStruct [−][src]
pub trait VariadicStruct: Clone + Debug + PartialEq + From<(TypeIndex, *const u8)> { type ItemBuilder: From<*mut Vec<u8>>; fn size_in_bytes(&self) -> usize; }
A type used as element of MultiArrayView
.
Implemented by an enum type.
Associated Types
type ItemBuilder: From<*mut Vec<u8>>
Associated type used for building an item in MultiVector
based on
this variadic type.
The builder is returned by
MultiVector::grow
method. It provides convenient methods add_{variant_name}
for each
enum variant.
Required Methods
fn size_in_bytes(&self) -> usize
Returns size in bytes of the current variant type.
Since a variadic struct can contain types of different sized, this is a method based on the current value type.