Struct mun_abi::StructDefinition
source · #[repr(C)]pub struct StructDefinition<'a> {
pub guid: Guid,
pub field_names: *const *const c_char,
pub memory_kind: StructMemoryKind,
/* private fields */
}
Expand description
Represents a struct declaration.
Fields§
§guid: Guid
The unique identifier of this struct
field_names: *const *const c_char
Struct fields’ names
memory_kind: StructMemoryKind
Struct memory kind
Implementations§
source§impl<'a> StructDefinition<'a>
impl<'a> StructDefinition<'a>
sourcepub fn field_names(&self) -> impl Iterator<Item = &str>
pub fn field_names(&self) -> impl Iterator<Item = &str>
Returns the struct’s field names.
sourcepub fn field_types(&self) -> &[TypeId<'a>]
pub fn field_types(&self) -> &[TypeId<'a>]
Returns the struct’s field types.
sourcepub fn field_offsets(&self) -> &[u16]
pub fn field_offsets(&self) -> &[u16]
Returns the struct’s field offsets.
sourcepub fn num_fields(&self) -> usize
pub fn num_fields(&self) -> usize
Returns the number of struct fields.