pub struct RentCollector {
pub epoch: Epoch,
pub epoch_schedule: EpochSchedule,
pub slots_per_year: f64,
pub rent: Rent,
}
Fields§
§epoch: Epoch
§epoch_schedule: EpochSchedule
§slots_per_year: f64
§rent: Rent
Implementations§
Source§impl RentCollector
impl RentCollector
pub fn new( epoch: Epoch, epoch_schedule: EpochSchedule, slots_per_year: f64, rent: Rent, ) -> Self
pub fn clone_with_epoch(&self, epoch: Epoch) -> Self
Sourcepub fn should_collect_rent(&self, address: &Pubkey, executable: bool) -> bool
pub fn should_collect_rent(&self, address: &Pubkey, executable: bool) -> bool
true if it is easy to determine this account should consider having rent collected from it
Sourcepub fn get_rent_due(
&self,
lamports: u64,
data_len: usize,
account_rent_epoch: Epoch,
) -> RentDue
pub fn get_rent_due( &self, lamports: u64, data_len: usize, account_rent_epoch: Epoch, ) -> RentDue
given an account that ‘should_collect_rent’ returns (amount rent due, is_exempt_from_rent)
pub fn collect_from_existing_account( &self, address: &Pubkey, account: &mut AccountSharedData, ) -> CollectedInfo
Trait Implementations§
Source§impl Clone for RentCollector
impl Clone for RentCollector
Source§fn clone(&self) -> RentCollector
fn clone(&self) -> RentCollector
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RentCollector
impl Debug for RentCollector
Source§impl Default for RentCollector
impl Default for RentCollector
Source§impl<'de> Deserialize<'de> for RentCollector
impl<'de> Deserialize<'de> for RentCollector
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RentCollector
impl PartialEq for RentCollector
Source§impl Serialize for RentCollector
impl Serialize for RentCollector
impl StructuralPartialEq for RentCollector
Auto Trait Implementations§
impl Freeze for RentCollector
impl RefUnwindSafe for RentCollector
impl Send for RentCollector
impl Sync for RentCollector
impl Unpin for RentCollector
impl UnwindSafe for RentCollector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more