pub trait RentConfigTrait {
// Required methods
fn base_rent(&self) -> u64;
fn compression_cost(&self) -> u64;
fn lamports_per_byte_per_epoch(&self) -> u64;
fn max_funded_epochs(&self) -> u64;
fn max_top_up(&self) -> u64;
// Provided methods
fn rent_curve_per_epoch(&self, num_bytes: u64) -> u64 { ... }
fn get_rent(&self, num_bytes: u64, epochs: u64) -> u64 { ... }
fn get_rent_with_compression_cost(&self, num_bytes: u64, epochs: u64) -> u64 { ... }
}Expand description
Trait for accessing rent configuration parameters.
This trait allows both owned RentConfig and zero-copy versions
(ZRentConfig, ZRentConfigMut) to be used interchangeably with
AccountRentState methods.
Required Methods§
Sourcefn compression_cost(&self) -> u64
fn compression_cost(&self) -> u64
Get the compression cost
Sourcefn lamports_per_byte_per_epoch(&self) -> u64
fn lamports_per_byte_per_epoch(&self) -> u64
Get lamports per byte per epoch
Sourcefn max_funded_epochs(&self) -> u64
fn max_funded_epochs(&self) -> u64
Get maximum funded epochs
Sourcefn max_top_up(&self) -> u64
fn max_top_up(&self) -> u64
Get maximum top-up amount per write operation
Provided Methods§
Sourcefn rent_curve_per_epoch(&self, num_bytes: u64) -> u64
fn rent_curve_per_epoch(&self, num_bytes: u64) -> u64
Calculate rent per epoch for a given number of bytes
Sourcefn get_rent(&self, num_bytes: u64, epochs: u64) -> u64
fn get_rent(&self, num_bytes: u64, epochs: u64) -> u64
Calculate total rent for given bytes and epochs
Sourcefn get_rent_with_compression_cost(&self, num_bytes: u64, epochs: u64) -> u64
fn get_rent_with_compression_cost(&self, num_bytes: u64, epochs: u64) -> u64
Calculate total rent including compression cost