pub struct RentCollectorWithMetrics(/* private fields */);
Expand description
Wrapper around RentCollector
to allow for overriding of some
SVMRentCollector
trait methods, which are otherwise implemented on
RentCollector
directly.
Overrides inject logging and metrics submission into the rent state assessment process.
Implementations§
Source§impl RentCollectorWithMetrics
impl RentCollectorWithMetrics
pub fn new(rent_collector: RentCollector) -> Self
Trait Implementations§
Source§impl SVMRentCollector for RentCollectorWithMetrics
impl SVMRentCollector for RentCollectorWithMetrics
Source§fn collect_rent(
&self,
address: &Pubkey,
account: &mut AccountSharedData,
) -> CollectedInfo
fn collect_rent( &self, address: &Pubkey, account: &mut AccountSharedData, ) -> CollectedInfo
Collect rent from an account.
Source§fn get_rent_due(
&self,
lamports: u64,
data_len: usize,
account_rent_epoch: Epoch,
) -> RentDue
fn get_rent_due( &self, lamports: u64, data_len: usize, account_rent_epoch: Epoch, ) -> RentDue
Get the rent due for an account.
Source§fn check_rent_state_with_account(
&self,
pre_rent_state: &RentState,
post_rent_state: &RentState,
address: &Pubkey,
account_state: &AccountSharedData,
account_index: IndexOfAccount,
) -> Result<()>
fn check_rent_state_with_account( &self, pre_rent_state: &RentState, post_rent_state: &RentState, address: &Pubkey, account_state: &AccountSharedData, account_index: IndexOfAccount, ) -> Result<()>
Check rent state transition for an account directly. Read more
Source§fn check_rent_state(
&self,
pre_rent_state: Option<&RentState>,
post_rent_state: Option<&RentState>,
transaction_context: &TransactionContext,
index: u16,
) -> Result<(), TransactionError>
fn check_rent_state( &self, pre_rent_state: Option<&RentState>, post_rent_state: Option<&RentState>, transaction_context: &TransactionContext, index: u16, ) -> Result<(), TransactionError>
Check rent state transition for an account in a transaction. Read more
Source§fn get_account_rent_state(&self, account: &AccountSharedData) -> RentState
fn get_account_rent_state(&self, account: &AccountSharedData) -> RentState
Determine the rent state of an account. Read more
Auto Trait Implementations§
impl Freeze for RentCollectorWithMetrics
impl RefUnwindSafe for RentCollectorWithMetrics
impl Send for RentCollectorWithMetrics
impl Sync for RentCollectorWithMetrics
impl Unpin for RentCollectorWithMetrics
impl UnwindSafe for RentCollectorWithMetrics
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> 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