pub struct TraitDef<Mods, Name, TypeVars, SuperTraits, Body> {
    pub mods: Mods,
    pub name: Name,
    pub type_variables: TypeVars,
    pub super_traits: SuperTraits,
    pub body: Body,
}Expand description
The declaration of a trait
Fields§
§mods: ModsThe trait modifiers, e.g. visibility. Must be a sequence.
name: NameThe name of the trait
type_variables: TypeVarsThe type variables. Must be a sequence
super_traits: SuperTraitsThe super traits. Must be a sequence
body: BodyThe trait definition’s body. Use NoOp if none exists.
Trait Implementations§
Source§impl<Mods, Name, TypeVars, SuperTraits, Body> CanHaveAttributes for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>
 
impl<Mods, Name, TypeVars, SuperTraits, Body> CanHaveAttributes for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>
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
Source§impl<Mods: Clone, Name: Clone, TypeVars: Clone, SuperTraits: Clone, Body: Clone> Clone for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>
 
impl<Mods: Clone, Name: Clone, TypeVars: Clone, SuperTraits: Clone, Body: Clone> Clone for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>
Source§impl<Mods: Debug, Name: Debug, TypeVars: Debug, SuperTraits: Debug, Body: Debug> Debug for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>
 
impl<Mods: Debug, Name: Debug, TypeVars: Debug, SuperTraits: Debug, Body: Debug> Debug for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>
Source§impl<O, Mods, Name, TypeVars, SuperTraits, Body> Writable<O> for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>where
    O: Output,
    Mods: WritableSeq<O>,
    Name: Writable<O>,
    TypeVars: WritableSeq<O>,
    SuperTraits: WritableSeq<O>,
    Body: Writable<O>,
 
impl<O, Mods, Name, TypeVars, SuperTraits, Body> Writable<O> for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>where
    O: Output,
    Mods: WritableSeq<O>,
    Name: Writable<O>,
    TypeVars: WritableSeq<O>,
    SuperTraits: WritableSeq<O>,
    Body: Writable<O>,
Auto Trait Implementations§
impl<Mods, Name, TypeVars, SuperTraits, Body> Freeze for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>
impl<Mods, Name, TypeVars, SuperTraits, Body> RefUnwindSafe for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>where
    Mods: RefUnwindSafe,
    Name: RefUnwindSafe,
    TypeVars: RefUnwindSafe,
    SuperTraits: RefUnwindSafe,
    Body: RefUnwindSafe,
impl<Mods, Name, TypeVars, SuperTraits, Body> Send for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>
impl<Mods, Name, TypeVars, SuperTraits, Body> Sync for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>
impl<Mods, Name, TypeVars, SuperTraits, Body> Unpin for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>
impl<Mods, Name, TypeVars, SuperTraits, Body> UnwindSafe for TraitDef<Mods, Name, TypeVars, SuperTraits, Body>where
    Mods: UnwindSafe,
    Name: UnwindSafe,
    TypeVars: UnwindSafe,
    SuperTraits: UnwindSafe,
    Body: UnwindSafe,
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