pub(crate) struct EnumMapFieldData {
pub(crate) base_name: String,
pub(crate) binding: Ident,
pub(crate) rust_name: Ident,
pub(crate) key_ty: Type,
pub(crate) val_ty: Type,
pub(crate) map_ty: Type,
}Expand description
Data for EnumResolvedField::Map.
A HashMap<K,V> or BTreeMap<K,V> field expands to two parallel list-columns:
<base_name>_keys: Vec<Option<Vec<K>>> and <base_name>_values: Vec<Option<Vec<V>>>.
Absent-variant rows get None in both columns. Key order follows the map’s own
iteration order: BTreeMap yields sorted keys, HashMap yields non-deterministic order.
Both are produced via into_iter().unzip() which guarantees pairwise alignment.
Fields§
§base_name: StringBase column name (field name or rename override).
binding: IdentBinding name used in destructure pattern.
rust_name: IdentOriginal Rust field name.
key_ty: TypeKey type K.
val_ty: TypeValue type V.
map_ty: TypeFull original field type (HashMap<K, V> / BTreeMap<K, V>). The reader
regroups the _keys/_values list-columns and collect()s back into this
exact map type — both HashMap and BTreeMap implement FromIterator<(K, V)>.
Auto Trait Implementations§
impl !Send for EnumMapFieldData
impl !Sync for EnumMapFieldData
impl Freeze for EnumMapFieldData
impl RefUnwindSafe for EnumMapFieldData
impl Unpin for EnumMapFieldData
impl UnsafeUnpin for EnumMapFieldData
impl UnwindSafe for EnumMapFieldData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> SizeHint for Twhere
T: ?Sized,
impl<T> SizeHint for Twhere
T: ?Sized,
Source§default fn lower_bound(&self) -> usize
default fn lower_bound(&self) -> usize
core_io_internals)[u8; 12] could return any value between 0 and
12 inclusively as a correct implementation. Read moreSource§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
sized_type_properties)[Self]. Read moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1048 bytes