Struct sc_client_api::in_mem::Backend [−][src]
Expand description
In-memory backend. Keeps all states and blocks in memory.
Warning: Doesn’t support all the features necessary for a proper database. Only use this struct for testing purposes. Do NOT use in production.
Implementations
Trait Implementations
Insert auxiliary data into key-value store. Read more
type BlockImportOperation = BlockImportOperation<Block>
type BlockImportOperation = BlockImportOperation<Block>Associated block insertion operation type.
type Blockchain = Blockchain<Block>
type Blockchain = Blockchain<Block>Associated blockchain backend type.
type State = InMemoryBackend<HashFor<Block>>
type State = InMemoryBackend<HashFor<Block>>Associated state backend type.
type OffchainStorage = OffchainStorage
type OffchainStorage = OffchainStorageOffchain 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>
) -> Result<()>
fn begin_state_operation(
&self,
operation: &mut Self::BlockImportOperation,
block: BlockId<Block>
) -> Result<()>Note an operation to contain state transition.
Commit block insertion.
fn finalize_block(
&self,
block: BlockId<Block>,
justification: Option<Justification>
) -> Result<()>
fn finalize_block(
&self,
block: BlockId<Block>,
justification: Option<Justification>
) -> Result<()>Finalize block with given Id. Read more
fn append_justification(
&self,
block: BlockId<Block>,
justification: Justification
) -> Result<()>
fn append_justification(
&self,
block: BlockId<Block>,
justification: Justification
) -> Result<()>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.
Returns true if the state for given block is available locally.
Returns reference to blockchain backend. Read more
Auto Trait Implementations
impl<Block> !RefUnwindSafe for Backend<Block>impl<Block> Unpin for Backend<Block> where
<Block as Block>::Hash: Unpin,
<<Block as Block>::Header as Header>::Hashing: Unpin, impl<Block> !UnwindSafe for Backend<Block>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