pub type UnpinHandle = UnpinHandle<Block<Header<u32, BlakeTwo256>, OpaqueExtrinsic>>;
Expand description
Keeps the state of a specific block pinned in memory while the handle is alive.
The handle is reference counted and once the last is dropped, the block is unpinned.
This is useful for runtime API calls to blocks that are racing against finality, e.g. for slashing purposes.
Aliased Type§
struct UnpinHandle(/* private fields */);
Implementations
Source§impl<Block> UnpinHandle<Block>where
Block: Block,
impl<Block> UnpinHandle<Block>where
Block: Block,
Sourcepub fn new(
hash: <Block as Block>::Hash,
unpin_worker_sender: TracingUnboundedSender<UnpinWorkerMessage<Block>>,
) -> UnpinHandle<Block>
pub fn new( hash: <Block as Block>::Hash, unpin_worker_sender: TracingUnboundedSender<UnpinWorkerMessage<Block>>, ) -> UnpinHandle<Block>
Create a new UnpinHandle
Trait Implementations
Source§impl<Block> Clone for UnpinHandle<Block>
impl<Block> Clone for UnpinHandle<Block>
Source§fn clone(&self) -> UnpinHandle<Block>
fn clone(&self) -> UnpinHandle<Block>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more