pub struct StorageSlot {
pub slot: u64,
pub offset: u8,
pub ty: MirType,
pub name: Option<Ident>,
}Expand description
A storage slot in the contract.
Fields§
§slot: u64The slot number.
offset: u8The offset within the slot (for packed storage).
ty: MirTypeThe type of the value stored.
name: Option<Ident>The variable name (for debugging).
Implementations§
Source§impl StorageSlot
impl StorageSlot
Sourcepub fn new(slot: u64, ty: MirType) -> StorageSlot
pub fn new(slot: u64, ty: MirType) -> StorageSlot
Creates a new storage slot.
Sourcepub fn with_offset(slot: u64, offset: u8, ty: MirType) -> StorageSlot
pub fn with_offset(slot: u64, offset: u8, ty: MirType) -> StorageSlot
Creates a new storage slot with an offset.
Trait Implementations§
Source§impl Clone for StorageSlot
impl Clone for StorageSlot
Source§fn clone(&self) -> StorageSlot
fn clone(&self) -> StorageSlot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StorageSlot
impl RefUnwindSafe for StorageSlot
impl Send for StorageSlot
impl Sync for StorageSlot
impl Unpin for StorageSlot
impl UnsafeUnpin for StorageSlot
impl UnwindSafe for StorageSlot
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§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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