pub struct StructType<'input> { /* private fields */ }
Expand description
A struct type.
Implementations§
Source§impl<'input> StructType<'input>
impl<'input> StructType<'input>
Sourcepub fn is_declaration(&self) -> bool
pub fn is_declaration(&self) -> bool
Return true if this is a declaration.
Sourcepub fn is_anon(&self) -> bool
pub fn is_anon(&self) -> bool
Return true if this is an anonymous type, or defined within an anonymous type.
Sourcepub fn variant_parts(&self) -> &[VariantPart<'input>]
pub fn variant_parts(&self) -> &[VariantPart<'input>]
The variant parts of this type.
Sourcepub fn layout<'me>(&'me self, hash: &FileHash<'_>) -> Vec<Layout<'input, 'me>>
pub fn layout<'me>(&'me self, hash: &FileHash<'_>) -> Vec<Layout<'input, 'me>>
The layout of members of this type.
Sourcepub fn cmp_id(a: &StructType<'_>, b: &StructType<'_>) -> Ordering
pub fn cmp_id(a: &StructType<'_>, b: &StructType<'_>) -> Ordering
Compare the identifying information of two types.
Structs are considered equal if their names are equal.
This can be used to sort, and to determine if two types refer to the same definition (even if there are differences in the definitions).
Trait Implementations§
Source§impl<'input> Clone for StructType<'input>
impl<'input> Clone for StructType<'input>
Source§fn clone(&self) -> StructType<'input>
fn clone(&self) -> StructType<'input>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'input> Debug for StructType<'input>
impl<'input> Debug for StructType<'input>
Source§impl<'input> Default for StructType<'input>
impl<'input> Default for StructType<'input>
Source§fn default() -> StructType<'input>
fn default() -> StructType<'input>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'input> Freeze for StructType<'input>
impl<'input> RefUnwindSafe for StructType<'input>
impl<'input> Send for StructType<'input>
impl<'input> Sync for StructType<'input>
impl<'input> Unpin for StructType<'input>
impl<'input> UnwindSafe for StructType<'input>
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