Struct sc_network::light_client_requests::sender::LightClientRequestSender[][src]

pub struct LightClientRequestSender<B: Block> { /* fields omitted */ }

State machine helping to send out light client requests.

Implementations

impl<B> LightClientRequestSender<B> where
    B: Block
[src]

pub fn new(
    id: &ProtocolId,
    checker: Arc<dyn FetchChecker<B>>,
    peerset: PeersetHandle
) -> Self
[src]

Construct a new light client handler.

pub fn update_best_block(&mut self, peer: &PeerId, num: NumberFor<B>)[src]

We rely on external information about peers best blocks as we lack the means to determine it ourselves.

pub fn request(&mut self, req: Request<B>) -> Result<(), SendRequestError>[src]

Issue a new light client request.

pub fn inject_connected(&mut self, peer: PeerId)[src]

Signal that the node is connected to the given peer.

pub fn inject_disconnected(&mut self, peer: PeerId)[src]

Signal that the node disconnected from the given peer.

Trait Implementations

impl<B: Block> Stream for LightClientRequestSender<B>[src]

type Item = OutEvent

Values yielded by the stream.

impl<B: Block> Unpin for LightClientRequestSender<B>[src]

Auto Trait Implementations

impl<B> !RefUnwindSafe for LightClientRequestSender<B>

impl<B> Send for LightClientRequestSender<B>

impl<B> !Sync for LightClientRequestSender<B>

impl<B> !UnwindSafe for LightClientRequestSender<B>

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<I> IntoStream for I where
    I: Stream
[src]

type Item = <I as Stream>::Item

The type of the elements being iterated over.

type IntoStream = I

Which kind of stream are we turning this into?

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[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<S> StreamExt for S where
    S: Stream + ?Sized
[src]

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<St> StreamExt for St where
    St: Stream + ?Sized
[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>, 
[src]

impl<T> WithSubscriber for T[src]