[−][src]Struct ink_lang_ir::Storage
An ink! storage struct definition.
Noticed by ink! through the #[ink(storage)]
annotation.
Note
An ink! smart contract must have exactly one storage definition. The storage definition must be found in the root of the ink! module.
Example
#[ink(storage)] pub struct MyStorage { my_value: bool, counter: u32, }
Implementations
impl Storage
[src]
pub fn attrs(&self) -> &[Attribute]
[src]
Returns the non-ink! attributes of the ink! storage struct.
pub fn ident(&self) -> &Ident
[src]
Returns the identifier of the storage struct.
pub fn fields(&self) -> Iter<'_, Field>
[src]
Returns an iter yielding all fields of the storage struct.
Trait Implementations
impl Debug for Storage
[src]
impl Eq for Storage
[src]
impl From<Storage> for InkItem
[src]
impl PartialEq<Storage> for Storage
[src]
impl StructuralEq for Storage
[src]
impl StructuralPartialEq for Storage
[src]
impl ToTokens for Storage
[src]
fn to_tokens(&self, tokens: &mut TokenStream)
[src]
We mainly implement this trait for this ink! type to have a derived
Spanned
implementation for it.
fn to_token_stream(&self) -> TokenStream
[src]
fn into_token_stream(self) -> TokenStream
[src]
impl TryFrom<ItemStruct> for Storage
[src]
Auto Trait Implementations
impl RefUnwindSafe for Storage
impl !Send for Storage
impl !Sync for Storage
impl Unpin for Storage
impl UnwindSafe for Storage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Spanned for T where
T: Spanned + ?Sized,
[src]
T: Spanned + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,