Struct sway_core::language::ty::TyStorageDeclaration
source · pub struct TyStorageDeclaration {
pub fields: Vec<TyStorageField>,
pub span: Span,
pub attributes: AttributesMap,
}
Fields§
§fields: Vec<TyStorageField>
§span: Span
§attributes: AttributesMap
Implementations§
source§impl TyStorageDeclaration
impl TyStorageDeclaration
pub fn new(
fields: Vec<TyStorageField>,
span: Span,
attributes: AttributesMap
) -> Self
sourcepub fn apply_storage_load(
&self,
type_engine: &TypeEngine,
fields: Vec<Ident>,
storage_fields: &[TyStorageField]
) -> CompileResult<(TyStorageAccess, TypeId)>
pub fn apply_storage_load(
&self,
type_engine: &TypeEngine,
fields: Vec<Ident>,
storage_fields: &[TyStorageField]
) -> CompileResult<(TyStorageAccess, TypeId)>
Given a field, find its type information in the declaration and return it. If the field has not been declared as a part of storage, return an error.
Trait Implementations§
source§impl Clone for TyStorageDeclaration
impl Clone for TyStorageDeclaration
source§fn clone(&self) -> TyStorageDeclaration
fn clone(&self) -> TyStorageDeclaration
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