#[non_exhaustive]#[repr(C)]pub struct StructType {
pub repr: Repr,
pub kind: StructKind,
pub fields: &'static [Field],
}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: &'static [Field]all fields, in declaration order (not necessarily in memory order)
Implementations§
Source§impl StructType
impl StructType
Sourcepub const fn builder() -> StructBuilder
pub const fn builder() -> StructBuilder
Returns a builder for StructDef
Trait Implementations§
Source§impl Clone for StructType
impl Clone for StructType
Source§fn clone(&self) -> StructType
fn clone(&self) -> StructType
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 Debug for StructType
impl Debug for StructType
Source§impl Hash for StructType
impl Hash for StructType
Source§impl PartialEq for StructType
impl PartialEq for StructType
impl Copy for StructType
impl Eq for StructType
impl StructuralPartialEq for StructType
Auto Trait Implementations§
impl Freeze for StructType
impl RefUnwindSafe for StructType
impl Send for StructType
impl Sync for StructType
impl Unpin for StructType
impl UnwindSafe for StructType
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