Struct exocore_chain::EngineHandle [−][src]
pub struct EngineHandle<CS, PS> where
CS: ChainStore,
PS: PendingStore, { /* fields omitted */ }
Expand description
Handle ot the Engine, allowing communication with the engine. The engine itself is owned by a future executor.
Implementations
pub fn get_chain_operation(
&self,
block_offset: BlockOffset,
operation_id: OperationId
) -> Result<Option<EngineOperation>, EngineError>
pub fn get_chain_operations(
&self,
from_offset: Option<BlockOffset>
) -> ChainOperationsIterator<CS, PS>
pub fn get_chain_last_block_info(
&self
) -> Result<Option<(BlockOffset, BlockHeight)>, EngineError>
pub fn get_chain_block_info(
&self,
offset: BlockOffset
) -> Result<Option<(BlockOffset, BlockHeight)>, EngineError>
pub fn get_chain_block(
&self,
offset: BlockOffset
) -> Result<Option<DataBlock<ChainData>>, EngineError>
pub fn get_pending_operation(
&self,
operation_id: OperationId
) -> Result<Option<EngineOperation>, EngineError>
pub fn get_pending_operations<R: RangeBounds<OperationId>>(
&self,
operations_range: R
) -> Result<Vec<EngineOperation>, EngineError>
pub fn get_operation(
&self,
operation_id: OperationId
) -> Result<Option<EngineOperation>, EngineError>
Take the events stream receiver out of this Handle
.
This stream is bounded and consumptions should be non-blocking to
prevent losing events. Calling the engine on every call should be
throttled in the case of a big read amplification.
Trait Implementations
Auto Trait Implementations
impl<CS, PS> !RefUnwindSafe for EngineHandle<CS, PS>
impl<CS, PS> Send for EngineHandle<CS, PS>
impl<CS, PS> Sync for EngineHandle<CS, PS>
impl<CS, PS> Unpin for EngineHandle<CS, PS>
impl<CS, PS> !UnwindSafe for EngineHandle<CS, PS>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn clone_any_send(&self) -> Box<dyn CloneAny + Send + 'static, Global> where
T: Send,
pub fn clone_any_sync(&self) -> Box<dyn CloneAny + Sync + 'static, Global> where
T: Sync,
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