Struct scilla_parser::ast::nodes::NodeContractDefinition
source · pub struct NodeContractDefinition {
pub contract_name: WithMetaData<NodeTypeNameIdentifier>,
pub parameters: WithMetaData<NodeComponentParameters>,
pub constraint: Option<WithMetaData<NodeWithConstraint>>,
pub fields: Vec<WithMetaData<NodeContractField>>,
pub components: Vec<WithMetaData<NodeComponentDefinition>>,
}Expand description
NodeContractDefinition represents a contract definition node in the AST It contains a contract name, parameters, optional constraint, fields and components
Fields§
§contract_name: WithMetaData<NodeTypeNameIdentifier>The contract name of the contract definition
parameters: WithMetaData<NodeComponentParameters>The parameters of the contract definition
constraint: Option<WithMetaData<NodeWithConstraint>>The constraint of the contract definition
fields: Vec<WithMetaData<NodeContractField>>The fields of the contract definition
components: Vec<WithMetaData<NodeComponentDefinition>>The components of the contract definition
Trait Implementations§
source§impl AstVisitor for NodeContractDefinition
impl AstVisitor for NodeContractDefinition
fn visit( &self, emitter: &mut dyn AstConverting ) -> Result<TraversalResult, String>
source§impl Clone for NodeContractDefinition
impl Clone for NodeContractDefinition
source§fn clone(&self) -> NodeContractDefinition
fn clone(&self) -> NodeContractDefinition
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 NodeContractDefinition
impl Debug for NodeContractDefinition
source§impl PartialEq for NodeContractDefinition
impl PartialEq for NodeContractDefinition
source§fn eq(&self, other: &NodeContractDefinition) -> bool
fn eq(&self, other: &NodeContractDefinition) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for NodeContractDefinition
impl PartialOrd for NodeContractDefinition
source§fn partial_cmp(&self, other: &NodeContractDefinition) -> Option<Ordering>
fn partial_cmp(&self, other: &NodeContractDefinition) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for NodeContractDefinition
impl StructuralEq for NodeContractDefinition
impl StructuralPartialEq for NodeContractDefinition
Auto Trait Implementations§
impl RefUnwindSafe for NodeContractDefinition
impl Send for NodeContractDefinition
impl Sync for NodeContractDefinition
impl Unpin for NodeContractDefinition
impl UnwindSafe for NodeContractDefinition
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