aztec-nr - noir_aztec::state_vars::storage

Trait HasStorageSlot

pub trait HasStorageSlot<let N: u32> {
    // Required methods
    pub fn get_storage_slot(self) -> Field;
}

State variables must implement this trait in order to placed in the storage struct (i.e. the one marked with the #[storage] attribute). The N value determines how many storage slots will be reserved for the state variable.

Required methods

pub fn get_storage_slot(self) -> Field

Implementors

impl<Context, let InitialDelay: u64, let M: u32, T> HasStorageSlot<M + 1> for DelayedPublicMutable<T, InitialDelay, Context>
where DelayedPublicMutableValues<T, InitialDelay>: Packable<N = M>

impl<Context> HasStorageSlot<1> for EasyPrivateUint<Context>

impl<Context, K, T> HasStorageSlot<1> for Map<K, T, Context>

impl<Context, T> HasStorageSlot<1> for PrivateImmutable<T, Context>

impl<Context, T> HasStorageSlot<1> for PrivateMutable<T, Context>

impl<Context, T> HasStorageSlot<1> for PrivateSet<T, Context>

impl<Context, let M: u32, T> HasStorageSlot<M + 1> for PublicImmutable<T, Context>
where T: Packable<N = M>

impl<Context, let M: u32, T> HasStorageSlot<M> for PublicMutable<T, Context>
where T: Packable<N = M>