Trait StorageSlot

pub trait StorageSlot:
    Send
    + Sync
    + Default
    + Copy
    + Clone
    + Eq
    + PartialEq
    + PartialOrd
    + Ord
    + Debug {
    // Required method
    fn value(self) -> Uint<256, 4>;

    // Provided methods
    fn zero() -> Self { ... }
    fn is_zero(&self) -> bool { ... }
}
Expand description

A word of data that can be stored in a storage slot

Required Methods§

fn value(self) -> Uint<256, 4>

The underlying value in the storage slot

Provided Methods§

fn zero() -> Self

The Below should return zeroed out, default words

fn is_zero(&self) -> bool

checks if the storage slot equals the zero() value

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§