pub struct ParallelSubSession { /* private fields */ }Expand description
One sub-session of a parallel run. Mirrors the driver-facing surface of
super::ManagedBacktestSession: control events arrive over a demuxed
channel from the shared control connection, while transactions flow over this
sub-session’s own data-plane subscription managers.
Implementations§
Source§impl ParallelSubSession
impl ParallelSubSession
pub fn session_info(&self) -> &SessionInfo
Sourcepub fn range(&self) -> (u64, u64)
pub fn range(&self) -> (u64, u64)
Server-authoritative (start_slot, end_slot) for this sub-session.
pub fn subscribe_transactions(&mut self, program_ids: Vec<String>)
pub fn subscribe_account_diffs(&mut self, program_ids: Vec<String>)
Sourcepub async fn next_event(&mut self) -> Result<ManagedEvent, ManagedSessionError>
pub async fn next_event(&mut self) -> Result<ManagedEvent, ManagedSessionError>
Receive the next control or subscription event for this sub-session. On
Completed, trailing subscription notifications are drained and delivered
before the Completed event, mirroring super::ManagedBacktestSession.
Sourcepub async fn send_continue(
&mut self,
params: ContinueParams,
) -> Result<(), ManagedSessionError>
pub async fn send_continue( &mut self, params: ContinueParams, ) -> Result<(), ManagedSessionError>
Wait until the shared control connection and this sub-session’s
subscriptions are up, then route a Continue as ContinueSessionV1.
Sourcepub async fn shutdown(self)
pub async fn shutdown(self)
Cancel this sub-session’s subscriptions and join them. The shared control
connection is owned by ManagedParallelSession and is not touched here.
Trait Implementations§
Source§impl Drop for ParallelSubSession
impl Drop for ParallelSubSession
Auto Trait Implementations§
impl !RefUnwindSafe for ParallelSubSession
impl !UnwindSafe for ParallelSubSession
impl Freeze for ParallelSubSession
impl Send for ParallelSubSession
impl Sync for ParallelSubSession
impl Unpin for ParallelSubSession
impl UnsafeUnpin for ParallelSubSession
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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