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.
Auto Trait Implementations§
impl Freeze for StorageItem
impl RefUnwindSafe for StorageItem
impl !Send for StorageItem
impl !Sync for StorageItem
impl Unpin for StorageItem
impl UnwindSafe for StorageItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more