Struct sway_core::language::parsed::declaration::StorageField
source · pub struct StorageField {
pub name: Ident,
pub attributes: AttributesMap,
pub type_info: TypeInfo,
pub type_info_span: Span,
pub initializer: Expression,
}Expand description
An individual field in a storage declaration. A type annotation and initializer value must be provided. The initializer value must be a constant expression. For now, that basically means just a literal, but as constant folding improves, we can update that.
Fields§
§name: Ident§attributes: AttributesMap§type_info: TypeInfo§type_info_span: Span§initializer: ExpressionTrait Implementations§
source§impl Clone for StorageField
impl Clone for StorageField
source§fn clone(&self) -> StorageField
fn clone(&self) -> StorageField
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 more