Struct PersistentPool

Source
pub struct PersistentPool<'a, C: ?Sized, T: RawAccess> { /* private fields */ }
Expand description

Persistent transaction pool that uses both a provided ephemeral cache and the cache persisting in the node database.

Implementations§

Source§

impl<'a, C, T> PersistentPool<'a, C, T>

Source

pub fn new<A>(access: A, cache: &'a C) -> Self
where A: Access<Base = T>,

Creates a new cache using the provided access to the storage and the ephemeral cache.

Trait Implementations§

Source§

impl<'a, C: Debug + ?Sized, T: Debug + RawAccess> Debug for PersistentPool<'a, C, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<C, T> TransactionCache for PersistentPool<'_, C, T>

Source§

fn get_transaction(&self, hash: Hash) -> Option<Verified<AnyTx>>

Gets a transaction from this cache. None is returned if the transaction is not in the cache.
Source§

fn contains_transaction(&self, hash: Hash) -> bool

Checks if the cache contains a transaction with the specified hash. Read more
Source§

fn transactions(&self) -> Transactions<'_>

Returns iterator over transactions contained in this cache.

Auto Trait Implementations§

§

impl<'a, C, T> Freeze for PersistentPool<'a, C, T>
where T: Freeze, <T as RawAccess>::Changes: Freeze, C: ?Sized,

§

impl<'a, C, T> RefUnwindSafe for PersistentPool<'a, C, T>

§

impl<'a, C, T> Send for PersistentPool<'a, C, T>
where C: Sync + ?Sized, T: Send, <T as RawAccess>::Changes: Send,

§

impl<'a, C, T> Sync for PersistentPool<'a, C, T>
where C: Sync + ?Sized, T: Sync, <T as RawAccess>::Changes: Sync,

§

impl<'a, C, T> Unpin for PersistentPool<'a, C, T>
where T: Unpin, <T as RawAccess>::Changes: Unpin, C: ?Sized,

§

impl<'a, C, T> UnwindSafe for PersistentPool<'a, C, T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V