[][src]Struct grin_servers::common::adapters::ChainToPoolAndNetAdapter

pub struct ChainToPoolAndNetAdapter<B, P, V> where
    B: BlockChain,
    P: PoolAdapter,
    V: VerifierCache + 'static, 
{ /* fields omitted */ }

Implementation of the ChainAdapter for the network. Gets notified when the accepted a new block, asking the pool to update its state and the network to broadcast the block

Implementations

impl<B, P, V> ChainToPoolAndNetAdapter<B, P, V> where
    B: BlockChain,
    P: PoolAdapter,
    V: VerifierCache + 'static, 
[src]

pub fn new(
    tx_pool: Arc<RwLock<TransactionPool<B, P, V>>>,
    hooks: Vec<Box<dyn ChainEvents + Send + Sync>>
) -> Self
[src]

Construct a ChainToPoolAndNetAdapter instance.

pub fn init(&self, peers: Arc<Peers>)[src]

Initialize a ChainToPoolAndNetAdapter instance with handle to a Peers object. Should only be called once.

Trait Implementations

impl<B, P, V> ChainAdapter for ChainToPoolAndNetAdapter<B, P, V> where
    B: BlockChain,
    P: PoolAdapter,
    V: VerifierCache + 'static, 
[src]

Auto Trait Implementations

impl<B, P, V> !RefUnwindSafe for ChainToPoolAndNetAdapter<B, P, V>

impl<B, P, V> Send for ChainToPoolAndNetAdapter<B, P, V>

impl<B, P, V> Sync for ChainToPoolAndNetAdapter<B, P, V>

impl<B, P, V> Unpin for ChainToPoolAndNetAdapter<B, P, V>

impl<B, P, V> !UnwindSafe for ChainToPoolAndNetAdapter<B, P, V>

Blanket Implementations

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SafeBorrow<T> for T where
    T: ?Sized

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> UnsafeAny for T where
    T: Any

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