pub enum EngineQueries {
Config(Sender<RollupConfig>),
State(Sender<EngineState>),
OutputAtBlock {
block: BlockNumberOrTag,
sender: Sender<(L2BlockInfo, OutputRoot, EngineState)>,
},
StateReceiver(Sender<Receiver<EngineState>>),
QueueLengthReceiver(Sender<Receiver<usize>>),
TaskQueueLength(Sender<usize>),
}Expand description
Query types supported by the engine for external communication.
Each variant includes a oneshot sender for the response, enabling async request-response patterns. The engine processes these queries and sends responses back through the provided channels.
Variants§
Config(Sender<RollupConfig>)
Request the current rollup configuration.
State(Sender<EngineState>)
Request the current EngineState snapshot.
OutputAtBlock
Request the L2 output root for a specific block.
Returns a tuple of block info, output root, and engine state at the requested block.
Fields
block: BlockNumberOrTagThe block number or tag to retrieve the output for.
sender: Sender<(L2BlockInfo, OutputRoot, EngineState)>Response channel for (block_info, output_root, engine_state).
StateReceiver(Sender<Receiver<EngineState>>)
Subscribe to engine state updates via a watch channel receiver.
QueueLengthReceiver(Sender<Receiver<usize>>)
Development API: Subscribe to task queue length updates.
TaskQueueLength(Sender<usize>)
Development API: Get the current number of pending tasks in the queue.
Implementations§
Source§impl EngineQueries
impl EngineQueries
Sourcepub async fn handle(
self,
state_recv: &Receiver<EngineState>,
queue_length_recv: &Receiver<usize>,
client: &Arc<EngineClient>,
rollup_config: &Arc<RollupConfig>,
) -> Result<(), EngineQueriesError>
pub async fn handle( self, state_recv: &Receiver<EngineState>, queue_length_recv: &Receiver<usize>, client: &Arc<EngineClient>, rollup_config: &Arc<RollupConfig>, ) -> Result<(), EngineQueriesError>
Handles the engine query request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EngineQueries
impl !RefUnwindSafe for EngineQueries
impl Send for EngineQueries
impl Sync for EngineQueries
impl Unpin for EngineQueries
impl !UnwindSafe for EngineQueries
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more