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: GuidThe unique identifier of this struct
field_names: *const *const c_charStruct fields’ names
memory_kind: StructMemoryKindStruct 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.
Trait Implementations§
Source§impl<'a> Debug for StructDefinition<'a>
impl<'a> Debug for StructDefinition<'a>
Source§impl<'a> PartialEq for StructDefinition<'a>
impl<'a> PartialEq for StructDefinition<'a>
impl<'a> Eq for StructDefinition<'a>
Auto Trait Implementations§
impl<'a> Freeze for StructDefinition<'a>
impl<'a> RefUnwindSafe for StructDefinition<'a>
impl<'a> !Send for StructDefinition<'a>
impl<'a> !Sync for StructDefinition<'a>
impl<'a> Unpin for StructDefinition<'a>
impl<'a> UnwindSafe for StructDefinition<'a>
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
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more