Struct solana_core::data_budget::DataBudget[][src]

pub struct DataBudget { /* fields omitted */ }

Implementations

impl DataBudget[src]

#[must_use]pub fn take(&self, size: usize) -> bool[src]

pub fn update<F>(&self, duration_millis: u64, updater: F) -> usize where
    F: Fn(usize) -> usize
[src]

Updates the budget if at least given milliseconds has passed since last update. Updater function maps current value of bytes to the new one. Returns current data-budget after the update.

pub fn clone_non_atomic(&self) -> Self[src]

Trait Implementations

impl Default for DataBudget[src]

Auto Trait Implementations

Blanket Implementations

impl<T> AbiExample for T[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]