Struct sc_rpc::chain::ChainClient[][src]

pub struct ChainClient<Number, Hash, Header, SignedBlock> { /* fields omitted */ }

The Client.

Implementations

impl<Number, Hash, Header, SignedBlock> Client<Number, Hash, Header, SignedBlock> where
    Hash: Send + Sync + 'static + DeserializeOwned + Serialize,
    SignedBlock: Send + Sync + 'static + DeserializeOwned,
    Header: Send + Sync + 'static + DeserializeOwned,
    Number: Send + Sync + 'static, 
[src]

pub fn new(sender: RpcChannel) -> Client<Number, Hash, Header, SignedBlock>[src]

Creates a new Client.

pub fn header(
    &self,
    hash: Option<Hash>
) -> impl Future<Item = Option<Header>, Error = RpcError>
[src]

Get header of a relay chain block.

pub fn block(
    &self,
    hash: Option<Hash>
) -> impl Future<Item = Option<SignedBlock>, Error = RpcError>
[src]

Get header and body of a relay chain block.

pub fn block_hash(
    &self,
    hash: Option<ListOrValue<NumberOrHex>>
) -> impl Future<Item = ListOrValue<Option<Hash>>, Error = RpcError>
[src]

Get hash of the n-th block in the canon chain.

By default returns latest block hash.

pub fn finalized_head(&self) -> impl Future<Item = Hash, Error = RpcError>[src]

Get hash of the last finalized block in the canon chain.

pub fn subscribe_all_heads(
    &self
) -> impl Future<Item = TypedSubscriptionStream<Header>, Error = RpcError>
[src]

All head subscription

pub fn subscribe_finalized_heads(
    &self
) -> impl Future<Item = TypedSubscriptionStream<Header>, Error = RpcError>
[src]

Finalized head subscription

pub fn subscribe_new_heads(
    &self
) -> impl Future<Item = TypedSubscriptionStream<Header>, Error = RpcError>
[src]

New head subscription

Trait Implementations

impl<Number, Hash, Header, SignedBlock> Clone for Client<Number, Hash, Header, SignedBlock> where
    Hash: Clone,
    SignedBlock: Clone,
    Header: Clone,
    Number: Clone
[src]

impl<Number, Hash, Header, SignedBlock> From<RpcChannel> for Client<Number, Hash, Header, SignedBlock> where
    Hash: Send + Sync + 'static + DeserializeOwned + Serialize,
    SignedBlock: Send + Sync + 'static + DeserializeOwned,
    Header: Send + Sync + 'static + DeserializeOwned,
    Number: Send + Sync + 'static, 
[src]

Auto Trait Implementations

impl<Number, Hash, Header, SignedBlock> !RefUnwindSafe for Client<Number, Hash, Header, SignedBlock>[src]

impl<Number, Hash, Header, SignedBlock> Send for Client<Number, Hash, Header, SignedBlock> where
    Hash: Send,
    Header: Send,
    Number: Send,
    SignedBlock: Send
[src]

impl<Number, Hash, Header, SignedBlock> Sync for Client<Number, Hash, Header, SignedBlock> where
    Hash: Sync,
    Header: Sync,
    Number: Sync,
    SignedBlock: Sync
[src]

impl<Number, Hash, Header, SignedBlock> Unpin for Client<Number, Hash, Header, SignedBlock> where
    Hash: Unpin,
    Header: Unpin,
    Number: Unpin,
    SignedBlock: Unpin
[src]

impl<Number, Hash, Header, SignedBlock> !UnwindSafe for Client<Number, Hash, Header, SignedBlock>[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> DynClone for T where
    T: Clone
[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> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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
    S: TryInto<T>,
    T: Bounded

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