#[non_exhaustive]#[repr(C)]pub struct StructType<'shape> {
pub repr: Repr,
pub kind: StructKind,
pub fields: &'shape [Field<'shape>],
}Expand description
Common fields for struct-like types
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.repr: ReprRepresentation of the struct’s data
kind: StructKindthe kind of struct (e.g. struct, tuple struct, tuple)
fields: &'shape [Field<'shape>]all fields, in declaration order (not necessarily in memory order)
Implementations§
Source§impl<'shape> StructType<'shape>
impl<'shape> StructType<'shape>
Sourcepub const fn builder() -> StructBuilder<'shape>
pub const fn builder() -> StructBuilder<'shape>
Returns a builder for StructType
Trait Implementations§
Source§impl<'shape> Clone for StructType<'shape>
impl<'shape> Clone for StructType<'shape>
Source§fn clone(&self) -> StructType<'shape>
fn clone(&self) -> StructType<'shape>
Returns a duplicate 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<'shape> Debug for StructType<'shape>
impl<'shape> Debug for StructType<'shape>
Source§impl<'shape> Hash for StructType<'shape>
impl<'shape> Hash for StructType<'shape>
Source§impl<'shape> PartialEq for StructType<'shape>
impl<'shape> PartialEq for StructType<'shape>
impl<'shape> Copy for StructType<'shape>
impl<'shape> Eq for StructType<'shape>
impl<'shape> StructuralPartialEq for StructType<'shape>
Auto Trait Implementations§
impl<'shape> Freeze for StructType<'shape>
impl<'shape> RefUnwindSafe for StructType<'shape>
impl<'shape> Send for StructType<'shape>
impl<'shape> Sync for StructType<'shape>
impl<'shape> Unpin for StructType<'shape>
impl<'shape> UnwindSafe for StructType<'shape>
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