Trait Value

Source
pub trait Value {
    // Required methods
    fn sload() -> Self;
    fn tload() -> Self;
    fn push(self);
    fn bytes32(&self) -> [u8; 32];
}
Expand description

Trait for the value used in assembly code

Required Methods§

Source

fn sload() -> Self

Load from storage

Source

fn tload() -> Self

Load from transient storage

Source

fn push(self)

Push self on the stack.

Source

fn bytes32(&self) -> [u8; 32]

Convert to bytes32

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.

Implementations on Foreign Types§

Source§

impl Value for i8

Source§

fn sload() -> Self

Source§

fn tload() -> Self

Source§

fn push(self)

Source§

fn bytes32(&self) -> [u8; 32]

Source§

impl Value for i16

Source§

fn sload() -> Self

Source§

fn tload() -> Self

Source§

fn push(self)

Source§

fn bytes32(&self) -> [u8; 32]

Source§

impl Value for i32

Source§

fn sload() -> Self

Source§

fn tload() -> Self

Source§

fn push(self)

Source§

fn bytes32(&self) -> [u8; 32]

Source§

impl Value for i64

Source§

fn sload() -> Self

Source§

fn tload() -> Self

Source§

fn push(self)

Source§

fn bytes32(&self) -> [u8; 32]

Source§

impl Value for u8

Source§

fn sload() -> Self

Source§

fn tload() -> Self

Source§

fn push(self)

Source§

fn bytes32(&self) -> [u8; 32]

Source§

impl Value for u16

Source§

fn sload() -> Self

Source§

fn tload() -> Self

Source§

fn push(self)

Source§

fn bytes32(&self) -> [u8; 32]

Source§

impl Value for u32

Source§

fn sload() -> Self

Source§

fn tload() -> Self

Source§

fn push(self)

Source§

fn bytes32(&self) -> [u8; 32]

Source§

impl Value for u64

Source§

fn sload() -> Self

Source§

fn tload() -> Self

Source§

fn push(self)

Source§

fn bytes32(&self) -> [u8; 32]

Implementors§