[][src]Struct sc_network::config::OnDemand

pub struct OnDemand<B: BlockT> { /* fields omitted */ }

Implements the Fetcher trait of the client. Makes it possible for the light client to perform network requests for some state.

This implementation stores all the requests in a queue. The network, in parallel, is then responsible for pulling elements out of that queue and fulfilling them.

Implementations

impl<B: BlockT> OnDemand<B> where
    B::Header: HeaderT
[src]

pub fn new(checker: Arc<dyn FetchChecker<B>>) -> Self[src]

Creates new on-demand service.

pub fn checker(&self) -> &Arc<dyn FetchChecker<B>>[src]

Get checker reference.

Trait Implementations

impl<B> Fetcher<B> for OnDemand<B> where
    B: BlockT,
    B::Header: HeaderT
[src]

type RemoteHeaderResult = RemoteResponse<B::Header>

Remote header future.

type RemoteReadResult = RemoteResponse<HashMap<Vec<u8>, Option<Vec<u8>>>>

Remote storage read future.

type RemoteCallResult = RemoteResponse<Vec<u8>>

Remote call result future.

type RemoteChangesResult = RemoteResponse<Vec<(NumberFor<B>, u32)>>

Remote changes result future.

type RemoteBodyResult = RemoteResponse<Vec<B::Extrinsic>>

Remote block body result future.

Auto Trait Implementations

impl<B> !RefUnwindSafe for OnDemand<B>[src]

impl<B> Send for OnDemand<B> where
    <B as Block>::Extrinsic: Send,
    <B as Block>::Hash: Send,
    <B as Block>::Header: Send,
    <<B as Block>::Header as Header>::Number: Send
[src]

impl<B> Sync for OnDemand<B> where
    <B as Block>::Extrinsic: Send,
    <B as Block>::Hash: Send,
    <B as Block>::Header: Send,
    <<B as Block>::Header as Header>::Number: Send
[src]

impl<B> Unpin for OnDemand<B>[src]

impl<B> !UnwindSafe for OnDemand<B>[src]

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> CheckedConversion for T[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, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 
[src]

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

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> SaturatedConversion for T[src]

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<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, 
[src]

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

impl<T> WithSubscriber for T[src]