Struct ink_ir::StorageItem
source · pub struct StorageItem { /* private fields */ }
Expand description
A checked ink! storage item with its configuration.
Implementations§
source§impl StorageItem
impl StorageItem
sourcepub fn new(config: TokenStream2, item: TokenStream2) -> Result<Self, Error>
pub fn new(config: TokenStream2, item: TokenStream2) -> Result<Self, Error>
Returns Ok
if the input matches all requirements for an ink! storage item.
sourcepub fn ast(&self) -> &DeriveInput
pub fn ast(&self) -> &DeriveInput
Returns AST.
sourcepub fn all_used_types(&self) -> Vec<Type>
pub fn all_used_types(&self) -> Vec<Type>
Returns all types that were used in the storage declaration.
sourcepub fn vis(&self) -> &Visibility
pub fn vis(&self) -> &Visibility
Returns the visibility of the storage.
sourcepub fn generics(&self) -> TokenStream2
pub fn generics(&self) -> TokenStream2
Returns the generics of the storage.
sourcepub fn salt(&self) -> TokenStream2
pub fn salt(&self) -> TokenStream2
Returns salt for storage key.