pub struct ManagedParallelSession { /* private fields */ }Expand description
High-level managed parallel session: owns the single multiplexed control
connection and hands out one ParallelSubSession per server-created
sub-session for the driver to run concurrently.
Implementations§
Source§impl ManagedParallelSession
impl ManagedParallelSession
Sourcepub async fn start_with_cancel(
url: String,
api_key: String,
create: CreateBacktestSessionRequest,
parent_cancel: CancellationToken,
) -> Result<Self, ManagedSessionError>
pub async fn start_with_cancel( url: String, api_key: String, create: CreateBacktestSessionRequest, parent_cancel: CancellationToken, ) -> Result<Self, ManagedSessionError>
Start a parallel session tied to a caller-owned cancellation token.
Sourcepub fn control_session_id(&self) -> &str
pub fn control_session_id(&self) -> &str
The server-assigned id grouping these sub-sessions (used for reconnect).
Sourcepub fn take_sub_sessions(&mut self) -> Vec<ParallelSubSession>
pub fn take_sub_sessions(&mut self) -> Vec<ParallelSubSession>
Take the sub-sessions for driving. Returns them once; subsequent calls yield an empty vec.
Trait Implementations§
Source§impl Drop for ManagedParallelSession
impl Drop for ManagedParallelSession
Auto Trait Implementations§
impl !RefUnwindSafe for ManagedParallelSession
impl !UnwindSafe for ManagedParallelSession
impl Freeze for ManagedParallelSession
impl Send for ManagedParallelSession
impl Sync for ManagedParallelSession
impl Unpin for ManagedParallelSession
impl UnsafeUnpin for ManagedParallelSession
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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