pub struct StructDef<Attr, Mods, Name, Elements> {
    pub attr: Attr,
    pub mods: Mods,
    pub kind: StructKind<Name, Elements>,
}Expand description
The declaration of a struct.
Fields§
§attr: AttrThe struct attributes. Must be a sequence, and each value will be placed inside #[].
mods: ModsThe struct modifiers. Must be a sequence.
kind: StructKind<Name, Elements>The kind of the struct.
It is suggested to use either a NamedTuple or StructCall. A semicolon will be automatically added afterward, as is needed for tuple structs, and this semicolon will not affect structs with named fields.
Trait Implementations§
Source§impl<Attr: Clone, Mods: Clone, Name: Clone, Elements: Clone> Clone for StructDef<Attr, Mods, Name, Elements>
 
impl<Attr: Clone, Mods: Clone, Name: Clone, Elements: Clone> Clone for StructDef<Attr, Mods, Name, Elements>
Source§impl<Attr: Debug, Mods: Debug, Name: Debug, Elements: Debug> Debug for StructDef<Attr, Mods, Name, Elements>
 
impl<Attr: Debug, Mods: Debug, Name: Debug, Elements: Debug> Debug for StructDef<Attr, Mods, Name, Elements>
Source§impl<O, Attr, Mods, Name, Elements> Writable<O> for StructDef<Attr, Mods, Name, Elements>where
    O: Output,
    Attr: WritableSeq<O>,
    Mods: WritableSeq<O>,
    Name: Writable<O>,
    Elements: WritableSeq<O>,
 
impl<O, Attr, Mods, Name, Elements> Writable<O> for StructDef<Attr, Mods, Name, Elements>where
    O: Output,
    Attr: WritableSeq<O>,
    Mods: WritableSeq<O>,
    Name: Writable<O>,
    Elements: WritableSeq<O>,
Auto Trait Implementations§
impl<Attr, Mods, Name, Elements> Freeze for StructDef<Attr, Mods, Name, Elements>
impl<Attr, Mods, Name, Elements> RefUnwindSafe for StructDef<Attr, Mods, Name, Elements>
impl<Attr, Mods, Name, Elements> Send for StructDef<Attr, Mods, Name, Elements>
impl<Attr, Mods, Name, Elements> Sync for StructDef<Attr, Mods, Name, Elements>
impl<Attr, Mods, Name, Elements> Unpin for StructDef<Attr, Mods, Name, Elements>
impl<Attr, Mods, Name, Elements> UnwindSafe for StructDef<Attr, Mods, Name, Elements>
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