Struct move_ir_types::ast::StructDefinition_
source · pub struct StructDefinition_ {
pub abilities: BTreeSet<Ability>,
pub name: StructName,
pub type_formals: Vec<StructTypeParameter>,
pub fields: StructDefinitionFields,
pub invariants: Vec<Invariant>,
}
Expand description
A Move struct
Fields§
§abilities: BTreeSet<Ability>
The declared abilities for the struct
name: StructName
Human-readable name for the struct that also serves as a nominal type
type_formals: Vec<StructTypeParameter>
The list of formal type arguments
fields: StructDefinitionFields
the fields each instance has
invariants: Vec<Invariant>
the invariants for this struct
Implementations§
source§impl StructDefinition_
impl StructDefinition_
sourcepub fn move_declared(
abilities: BTreeSet<Ability>,
name: Symbol,
type_formals: Vec<StructTypeParameter>,
fields: Fields<Type>,
invariants: Vec<Invariant>
) -> Self
pub fn move_declared( abilities: BTreeSet<Ability>, name: Symbol, type_formals: Vec<StructTypeParameter>, fields: Fields<Type>, invariants: Vec<Invariant> ) -> Self
Creates a new StructDefinition from the abilities, the string representation of the name, and the user specified fields, a map from their names to their types Does not verify the correctness of any internal properties, e.g. doesn’t check that the fields do not have reference types
Trait Implementations§
source§impl Clone for StructDefinition_
impl Clone for StructDefinition_
source§fn clone(&self) -> StructDefinition_
fn clone(&self) -> StructDefinition_
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 StructDefinition_
impl Debug for StructDefinition_
source§impl Display for StructDefinition_
impl Display for StructDefinition_
source§impl PartialEq<StructDefinition_> for StructDefinition_
impl PartialEq<StructDefinition_> for StructDefinition_
source§fn eq(&self, other: &StructDefinition_) -> bool
fn eq(&self, other: &StructDefinition_) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.