pub struct ExecutionStream { /* private fields */ }Expand description
Sequenced state for the executions an agent prepared in one market. The
stream opens with a watch frame for the requested handles and begins with
a snapshot; later watch calls add handles on the same stream. Any market
or sequence mismatch fails closed so the caller reconnects.
Implementations§
Source§impl ExecutionStream
impl ExecutionStream
pub fn market_id(&self) -> &str
Sourcepub async fn watch(&mut self, execution_ids: &[String]) -> Result<(), SdkError>
pub async fn watch(&mut self, execution_ids: &[String]) -> Result<(), SdkError>
Watch additional handles; the server answers with an update or unknown event per new handle on the same sequence.
Sourcepub async fn next_event(
&mut self,
) -> Result<Option<PlatformExecutionEvent>, SdkError>
pub async fn next_event( &mut self, ) -> Result<Option<PlatformExecutionEvent>, SdkError>
The first call returns the snapshot received during connection. Later calls return sequenced update, expired, unknown, heartbeat, or recovery snapshot events.
pub async fn close(&mut self) -> Result<(), SdkError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ExecutionStream
impl !RefUnwindSafe for ExecutionStream
impl !UnwindSafe for ExecutionStream
impl Send for ExecutionStream
impl Sync for ExecutionStream
impl Unpin for ExecutionStream
impl UnsafeUnpin for ExecutionStream
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
Mutably borrows from an owned value. Read more