Trait AccessListItemTr

Source
pub trait AccessListItemTr {
    // Required methods
    fn address(&self) -> &Address;
    fn storage_slots(&self) -> impl Iterator<Item = &FixedBytes<32>>;
}
Expand description

Access list type is introduced in EIP-2930, and every transaction after it contains access list.

Note: Iterator over access list returns account address and storage slot keys that are warm loaded before transaction execution.

Number of account and storage slots is used to calculate initial tx gas cost.

Required Methods§

Source

fn address(&self) -> &Address

Returns account address.

Source

fn storage_slots(&self) -> impl Iterator<Item = &FixedBytes<32>>

Returns storage slot keys.

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<'a, T> AccessListItemTr for &'a T
where T: 'a + AccessListItemTr + ?Sized,

Source§

fn address(&self) -> &Address

Source§

fn storage_slots(&self) -> impl Iterator<Item = &FixedBytes<32>>

Source§

impl<T> AccessListItemTr for Box<T>
where T: AccessListItemTr + ?Sized,

Source§

fn address(&self) -> &Address

Source§

fn storage_slots(&self) -> impl Iterator<Item = &FixedBytes<32>>

Source§

impl<T> AccessListItemTr for Rc<T>
where T: AccessListItemTr + ?Sized,

Source§

fn address(&self) -> &Address

Source§

fn storage_slots(&self) -> impl Iterator<Item = &FixedBytes<32>>

Source§

impl<T> AccessListItemTr for Arc<T>
where T: AccessListItemTr + ?Sized,

Source§

fn address(&self) -> &Address

Source§

fn storage_slots(&self) -> impl Iterator<Item = &FixedBytes<32>>

Implementors§