Struct sc_rpc::chain::gen_client::Client [−][src]
pub struct Client<Number, Hash, Header, SignedBlock> { /* fields omitted */ }
Expand description
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,
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,
Creates a new Client
.
Get header of a relay chain block.
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>
pub fn block_hash(
&self,
hash: Option<ListOrValue<NumberOrHex>>
) -> impl Future<Item = ListOrValue<Option<Hash>>, Error = RpcError>
Get hash of the n-th block in the canon chain.
By default returns latest block hash.
Get hash of the last finalized block in the canon chain.
pub fn subscribe_finalized_heads(
&self
) -> impl Future<Item = TypedSubscriptionStream<Header>, Error = RpcError>
pub fn subscribe_finalized_heads(
&self
) -> impl Future<Item = TypedSubscriptionStream<Header>, Error = RpcError>
Finalized head subscription
pub fn subscribe_all_heads(
&self
) -> impl Future<Item = TypedSubscriptionStream<Header>, Error = RpcError>
pub fn subscribe_all_heads(
&self
) -> impl Future<Item = TypedSubscriptionStream<Header>, Error = RpcError>
All head subscription
pub fn subscribe_new_heads(
&self
) -> impl Future<Item = TypedSubscriptionStream<Header>, Error = RpcError>
pub fn subscribe_new_heads(
&self
) -> impl Future<Item = TypedSubscriptionStream<Header>, Error = RpcError>
New head subscription
Trait Implementations
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,
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,
Auto Trait Implementations
impl<Number, Hash, Header, SignedBlock> !RefUnwindSafe for Client<Number, Hash, Header, SignedBlock>
impl<Number, Hash, Header, SignedBlock> Send for Client<Number, Hash, Header, SignedBlock> where
Hash: Send,
Header: Send,
Number: Send,
SignedBlock: Send,
impl<Number, Hash, Header, SignedBlock> Sync for Client<Number, Hash, Header, SignedBlock> where
Hash: Sync,
Header: Sync,
Number: Sync,
SignedBlock: Sync,
impl<Number, Hash, Header, SignedBlock> Unpin for Client<Number, Hash, Header, SignedBlock> where
Hash: Unpin,
Header: Unpin,
Number: Unpin,
SignedBlock: Unpin,
impl<Number, Hash, Header, SignedBlock> !UnwindSafe for Client<Number, Hash, Header, SignedBlock>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more