pub struct ParentTransactionCacheBuilder { /* private fields */ }Expand description
Builder for ParentTransactionCache.
Implementations§
Source§impl ParentTransactionCacheBuilder
impl ParentTransactionCacheBuilder
Sourcepub fn build(
self,
) -> Result<ParentTransactionCache, ParentTransactionCacheBuilderError>
pub fn build( self, ) -> Result<ParentTransactionCache, ParentTransactionCacheBuilderError>
Source§impl ParentTransactionCacheBuilder
impl ParentTransactionCacheBuilder
Sourcepub fn cache_size(self, value: usize) -> Self
pub fn cache_size(self, value: usize) -> Self
Sets the size of the cache. Default is 100_000.
Sourcepub fn for_accounts(self, accounts_id: Vec<AccountId>) -> Self
pub fn for_accounts(self, accounts_id: Vec<AccountId>) -> Self
Stores the Vec of AccountId to cache transactions for. If not set, the cache will be created for all the Transactions in the block. If set the cache will be created only for the transactions that have the sender or receiver in the list of accounts. Warning: This method overrides the previous value.
Sourcepub fn for_account(self, account_id: AccountId) -> Self
pub fn for_account(self, account_id: AccountId) -> Self
Adds an account to the watching list for the parent transaction cache. Similarly to the method for_accounts this method will create the cache only for the transactions that have the sender or receiver in the list of accounts. Warning: This method appends to the previous value.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ParentTransactionCacheBuilder
impl RefUnwindSafe for ParentTransactionCacheBuilder
impl Send for ParentTransactionCacheBuilder
impl Sync for ParentTransactionCacheBuilder
impl Unpin for ParentTransactionCacheBuilder
impl UnwindSafe for ParentTransactionCacheBuilder
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 moreCreates a shared type from an unshared type.