Struct valkyrie_ast::TraitDeclaration
source · pub struct TraitDeclaration {
pub kind: TraitKind,
pub name: IdentifierNode,
pub generics: Option<ParametersList>,
pub implements: Option<ExpressionKind>,
pub body: Vec<TraitTerm>,
}Expand description
trait name: Debug {}
Fields§
§kind: TraitKindThe kind of the trait
name: IdentifierNodeThe name of the trait
generics: Option<ParametersList>The generic parameters
implements: Option<ExpressionKind>trait A: Debug { }, the trait bounds
body: Vec<TraitTerm>the needed fields(zero parameter method, get + set)
Trait Implementations§
source§impl Clone for TraitDeclaration
impl Clone for TraitDeclaration
source§fn clone(&self) -> TraitDeclaration
fn clone(&self) -> TraitDeclaration
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 TraitDeclaration
impl Debug for TraitDeclaration
source§impl From<TraitDeclaration> for StatementKind
impl From<TraitDeclaration> for StatementKind
source§fn from(o: TraitDeclaration) -> Self
fn from(o: TraitDeclaration) -> Self
Converts to this type from the input type.
source§impl Hash for TraitDeclaration
impl Hash for TraitDeclaration
source§impl PartialEq for TraitDeclaration
impl PartialEq for TraitDeclaration
source§fn eq(&self, other: &TraitDeclaration) -> bool
fn eq(&self, other: &TraitDeclaration) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for TraitDeclaration
impl StructuralPartialEq for TraitDeclaration
Auto Trait Implementations§
impl RefUnwindSafe for TraitDeclaration
impl Send for TraitDeclaration
impl Sync for TraitDeclaration
impl Unpin for TraitDeclaration
impl UnwindSafe for TraitDeclaration
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