Struct solang_parser::pt::ContractDefinition
source · pub struct ContractDefinition {
pub loc: Loc,
pub ty: ContractTy,
pub name: Option<Identifier>,
pub base: Vec<Base>,
pub parts: Vec<ContractPart>,
}
Expand description
A contract definition.
<ty> <name> [<base>,*] { <parts>,* }
Fields§
§loc: Loc
The code location.
ty: ContractTy
The contract type.
name: Option<Identifier>
The identifier.
This field is None
only if an error occurred during parsing.
base: Vec<Base>
The list of inheritance specifiers.
parts: Vec<ContractPart>
The list of contract parts.
Trait Implementations§
source§impl Clone for ContractDefinition
impl Clone for ContractDefinition
source§fn clone(&self) -> ContractDefinition
fn clone(&self) -> ContractDefinition
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 CodeLocation for ContractDefinition
impl CodeLocation for ContractDefinition
source§impl Debug for ContractDefinition
impl Debug for ContractDefinition
source§impl Display for ContractDefinition
impl Display for ContractDefinition
source§impl PartialEq for ContractDefinition
impl PartialEq for ContractDefinition
source§fn eq(&self, other: &ContractDefinition) -> bool
fn eq(&self, other: &ContractDefinition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ContractDefinition
impl StructuralEq for ContractDefinition
impl StructuralPartialEq for ContractDefinition
Auto Trait Implementations§
impl RefUnwindSafe for ContractDefinition
impl Send for ContractDefinition
impl Sync for ContractDefinition
impl Unpin for ContractDefinition
impl UnwindSafe for ContractDefinition
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