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,
account: &impl ReadableAccount,
) -> bool
pub fn should_collect_rent( &self, address: &Pubkey, account: &impl ReadableAccount, ) -> bool
true if it is easy to determine this account should consider having rent collected from it
sourcepub fn get_rent_due(&self, account: &impl ReadableAccount) -> RentDue
pub fn get_rent_due(&self, account: &impl ReadableAccount) -> 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, set_exempt_rent_epoch_max: bool, ) -> CollectedInfo
Trait Implementations§
source§impl AbiExample for RentCollector
impl AbiExample for RentCollector
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> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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