Struct sc_rpc::chain::Chain [−][src]
pub struct Chain<Block: BlockT, Client> { /* fields omitted */ }
Expand description
Chain API with subscriptions support.
Trait Implementations
impl<Block, Client> ChainApi<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, <Block as Block>::Header, SignedBlock<Block>> for Chain<Block, Client> where
Block: BlockT + 'static,
Client: HeaderBackend<Block> + BlockchainEvents<Block> + 'static,
impl<Block, Client> ChainApi<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, <Block as Block>::Header, SignedBlock<Block>> for Chain<Block, Client> where
Block: BlockT + 'static,
Client: HeaderBackend<Block> + BlockchainEvents<Block> + 'static, Get header of a relay chain block.
Get header and body of a relay chain block.
fn block_hash(
&self,
number: Option<ListOrValue<NumberOrHex>>
) -> Result<ListOrValue<Option<Block::Hash>>>
fn block_hash(
&self,
number: Option<ListOrValue<NumberOrHex>>
) -> Result<ListOrValue<Option<Block::Hash>>>Get hash of the n-th block in the canon chain. Read more
Get hash of the last finalized block in the canon chain.
fn subscribe_all_heads(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<Block::Header>
)
fn subscribe_all_heads(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<Block::Header>
)All head subscription
fn unsubscribe_all_heads(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> RpcResult<bool>
fn unsubscribe_all_heads(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> RpcResult<bool>Unsubscribe from all head subscription.
fn subscribe_new_heads(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<Block::Header>
)
fn subscribe_new_heads(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<Block::Header>
)New head subscription
fn unsubscribe_new_heads(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> RpcResult<bool>
fn unsubscribe_new_heads(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> RpcResult<bool>Unsubscribe from new head subscription.
fn subscribe_finalized_heads(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<Block::Header>
)
fn subscribe_finalized_heads(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<Block::Header>
)Finalized head subscription
fn unsubscribe_finalized_heads(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> RpcResult<bool>
fn unsubscribe_finalized_heads(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> RpcResult<bool>Unsubscribe from finalized head subscription.
Create an IoDelegate, wiring rpc calls to the trait methods.
Auto Trait Implementations
impl<Block, Client> !RefUnwindSafe for Chain<Block, Client>impl<Block, Client> !UnwindSafe for Chain<Block, Client>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 = TShould always be Self
The counterpart to unchecked_from.
Consume self to return an equivalent value of T.
pub fn vzip(self) -> VAttaches 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