Struct sc_light::backend::Backend [−][src]
pub struct Backend<S, H: Hasher> { /* fields omitted */ }
Expand description
Light client backend.
Implementations
Create new light backend.
Get shared blockchain reference.
Trait Implementations
fn insert_aux<'a, 'b: 'a, 'c: 'a, I: IntoIterator<Item = &'a (&'c [u8], &'c [u8])>, D: IntoIterator<Item = &'a &'b [u8]>>(
&self,
insert: I,
delete: D
) -> ClientResult<()>
fn insert_aux<'a, 'b: 'a, 'c: 'a, I: IntoIterator<Item = &'a (&'c [u8], &'c [u8])>, D: IntoIterator<Item = &'a &'b [u8]>>(
&self,
insert: I,
delete: D
) -> ClientResult<()>
Insert auxiliary data into key-value store. Read more
type BlockImportOperation = ImportOperation<Block, S>
type BlockImportOperation = ImportOperation<Block, S>
Associated block insertion operation type.
type Blockchain = Blockchain<S>
type Blockchain = Blockchain<S>
Associated blockchain backend type.
type State = GenesisOrUnavailableState<HashFor<Block>>
type State = GenesisOrUnavailableState<HashFor<Block>>
Associated state backend type.
Offchain workers local storage.
Begin a new block insertion transaction with given parent block id. Read more
fn begin_state_operation(
&self,
_operation: &mut Self::BlockImportOperation,
_block: BlockId<Block>
) -> ClientResult<()>
fn begin_state_operation(
&self,
_operation: &mut Self::BlockImportOperation,
_block: BlockId<Block>
) -> ClientResult<()>
Note an operation to contain state transition.
Commit block insertion.
fn finalize_block(
&self,
block: BlockId<Block>,
_justification: Option<Justification>
) -> ClientResult<()>
fn finalize_block(
&self,
block: BlockId<Block>,
_justification: Option<Justification>
) -> ClientResult<()>
Finalize block with given Id. Read more
fn append_justification(
&self,
_block: BlockId<Block>,
_justification: Justification
) -> ClientResult<()>
fn append_justification(
&self,
_block: BlockId<Block>,
_justification: Justification
) -> ClientResult<()>
Append justification to the block with the given Id. Read more
Returns reference to blockchain backend.
Returns current usage statistics.
Returns reference to changes trie storage.
Returns a handle to offchain storage.
Returns state backend with post-state of given block.
Attempts to revert the chain by n
blocks. If revert_finalized
is set it will attempt to
revert past any finalized block, this is unsafe and can potentially leave the node in an
inconsistent state. Read more
Discard non-best, unfinalized leaf block.
Gain access to the import lock around this backend. Read more
Returns true if state for given block is available.
Insert auxiliary data into key-value store.
impl<S, Block> RemoteBackend<Block> for Backend<S, HashFor<Block>> where
Block: BlockT,
S: BlockchainStorage<Block> + 'static,
Block::Hash: Ord,
impl<S, Block> RemoteBackend<Block> for Backend<S, HashFor<Block>> where
Block: BlockT,
S: BlockchainStorage<Block> + 'static,
Block::Hash: Ord,
Returns true if the state for given block is available locally.
Returns reference to blockchain backend. Read more
Auto Trait Implementations
impl<S, H> !RefUnwindSafe for Backend<S, H>
impl<S, H> !UnwindSafe for Backend<S, H>
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