pub enum Storage {
Memory(memory),
Storage(storage),
Calldata(calldata),
}
Expand description
A storage location.
Variants§
Implementations§
Source§impl Storage
impl Storage
Sourcepub fn new_memory(span: Span) -> Self
pub fn new_memory(span: Span) -> Self
Creates a new Memory
keyword with the given span
.
Sourcepub fn new_storage(span: Span) -> Self
pub fn new_storage(span: Span) -> Self
Creates a new Storage
keyword with the given span
.
Sourcepub fn new_calldata(span: Span) -> Self
pub fn new_calldata(span: Span) -> Self
Creates a new Calldata
keyword with the given span
.
pub fn parse_opt(input: ParseStream<'_>) -> Result<Option<Self>>
pub fn peek(lookahead: &Lookahead1<'_>) -> bool
pub const fn as_str(self) -> &'static str
pub const fn as_debug_str(self) -> &'static str
Sourcepub const fn is_storage(self) -> bool
pub const fn is_storage(self) -> bool
Returns true if self
matches Self::Storage
.
Sourcepub const fn is_calldata(self) -> bool
pub const fn is_calldata(self) -> bool
Returns true if self
matches Self::Calldata
.
Trait Implementations§
Source§impl Spanned for Storage
impl Spanned for Storage
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.impl Copy for Storage
impl Eq for Storage
Auto Trait Implementations§
impl Freeze for Storage
impl RefUnwindSafe for Storage
impl !Send for Storage
impl !Sync for Storage
impl Unpin for Storage
impl UnwindSafe for Storage
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)