pub enum TraitItem {
Required(FunctionSig),
Provided(Function),
AssocType {
docs: Vec<Spanned<String>>,
name: Spanned<String>,
bounds: Vec<Spanned<Path>>,
},
}Expand description
An item inside a trait body.
Variants§
Required(FunctionSig)
A required method (signature only).
Provided(Function)
A provided method (with default body).
AssocType
An associated type declaration: type Item.
bounds is parsed (type Item: Display) but not supported —
nova-typeck reports E0900 for a non-empty list, the same way a
where clause on a trait is parsed here and rejected there. Parsing it
gives a precise span and a real diagnostic instead of a syntax error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TraitItem
impl RefUnwindSafe for TraitItem
impl Send for TraitItem
impl Sync for TraitItem
impl Unpin for TraitItem
impl UnsafeUnpin for TraitItem
impl UnwindSafe for TraitItem
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