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

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

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.