Skip to main content

Module embed_enum_collection

Module embed_enum_collection 

Source
Expand description

Vec<unit-enum> collections. The element is a scalar discriminant, so the column is a native scalar array where the backend has one — int8[] for integer discriminants, ink[] for a native enum — never a document.

Functions§

enum_storage_propagates_through_nested_embed
Enum storage also follows an enum nested through a flattened embed.
enum_storage_propagates_through_wrappers
Transparent field wrappers preserve enum-level storage, and a field-level override still wins after passing through the wrapper.
native_enum_vec_create_get
A Vec<native-enum> round-trips through INSERT and a fresh fetch, exercising the enum-array bind and decode wire paths.
native_enum_vec_stores_as_enum_array
A Vec<native-enum> stores as a native enum array (ink[]), not text[].
vec_enum_contains_and_len
The scalar-collection operators unlocked by the emitted Scalar impl: contains(variant) matches on discriminant membership and len() filters on cardinality.
vec_enum_create_get
A Vec<unit-enum> round-trips through INSERT and a fresh fetch.
vec_enum_uses_discriminant_storage
Enum-level storage applies to collection elements, while a field-level type overrides that default. Both paths bridge and round-trip each element.