Rent

Trait Rent 

Source
pub trait Rent {
    // Required method
    fn weighted_bytes(&self, config: &RentStructure) -> u64;

    // Provided method
    fn rent_cost(&self, config: &RentStructure) -> u64 { ... }
}
Expand description

A trait to facilitate the computation of the byte cost of block outputs, which is central to dust protection.

Required Methods§

Source

fn weighted_bytes(&self, config: &RentStructure) -> u64

Different fields in a type lead to different storage requirements for the ledger state.

Provided Methods§

Source

fn rent_cost(&self, config: &RentStructure) -> u64

Computes the rent cost given a RentStructure.

Implementations on Foreign Types§

Source§

impl<T: Rent, const N: usize> Rent for [T; N]

Implementors§