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
sourceimpl TyStorageDeclaration
impl TyStorageDeclaration
pub fn new(
fields: Vec<TyStorageField>,
span: Span,
attributes: AttributesMap
) -> Self
sourcepub fn apply_storage_load(
&self,
fields: Vec<Ident>,
storage_fields: &[TyStorageField]
) -> CompileResult<(TyStorageAccess, TypeId)>
pub fn apply_storage_load(
&self,
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
sourceimpl Clone for TyStorageDeclaration
impl Clone for TyStorageDeclaration
sourcefn clone(&self) -> TyStorageDeclaration
fn clone(&self) -> TyStorageDeclaration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for TyStorageDeclaration
impl Debug for TyStorageDeclaration
sourceimpl PartialEq<TyStorageDeclaration> for TyStorageDeclaration
impl PartialEq<TyStorageDeclaration> for TyStorageDeclaration
impl Eq for TyStorageDeclaration
Auto Trait Implementations
impl RefUnwindSafe for TyStorageDeclaration
impl Send for TyStorageDeclaration
impl Sync for TyStorageDeclaration
impl Unpin for TyStorageDeclaration
impl UnwindSafe for TyStorageDeclaration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.