pub struct StructDef<Mods, Name, Elements> {
pub mods: Mods,
pub kind: StructKind<Name, Elements>,
}Expand description
The declaration of a struct.
Fields§
§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<Mods, Name, Elements> CanHaveAttributes for StructDef<Mods, Name, Elements>
impl<Mods, Name, Elements> CanHaveAttributes for StructDef<Mods, Name, Elements>
Source§fn with_attributes<Attr>(self, attr: Attr) -> WithAttributes<Attr, Self>
fn with_attributes<Attr>(self, attr: Attr) -> WithAttributes<Attr, Self>
Adds attributes to this writable
Auto Trait Implementations§
impl<Mods, Name, Elements> Freeze for StructDef<Mods, Name, Elements>
impl<Mods, Name, Elements> RefUnwindSafe for StructDef<Mods, Name, Elements>
impl<Mods, Name, Elements> Send for StructDef<Mods, Name, Elements>
impl<Mods, Name, Elements> Sync for StructDef<Mods, Name, Elements>
impl<Mods, Name, Elements> Unpin for StructDef<Mods, Name, Elements>
impl<Mods, Name, Elements> UnwindSafe for StructDef<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