pub struct StartSessionParamsBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> StartSessionParamsBuilder<S>
impl<S: State> StartSessionParamsBuilder<S>
Sourcepub fn build(self) -> StartSessionParamswhere
S: IsComplete,
pub fn build(self) -> StartSessionParamswhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn url(self, url: impl Into<String>) -> StartSessionParamsBuilder<SetUrl<S>>where
S::Url: IsUnset,
pub fn url(self, url: impl Into<String>) -> StartSessionParamsBuilder<SetUrl<S>>where
S::Url: IsUnset,
Required.
The server’s address. The builder normalizes it with crate::backtest_ws_url: a bare
host becomes wss://<host>/backtest, and a ws:// or wss:// URL gains /backtest
if it lacks it.
Sourcepub fn api_key(self, value: String) -> StartSessionParamsBuilder<SetApiKey<S>>where
S::ApiKey: IsUnset,
pub fn api_key(self, value: String) -> StartSessionParamsBuilder<SetApiKey<S>>where
S::ApiKey: IsUnset,
Required.
Your API key, sent as the X-API-Key header.
Sourcepub fn extra_headers(
self,
value: HeaderMap,
) -> StartSessionParamsBuilder<SetExtraHeaders<S>>where
S::ExtraHeaders: IsUnset,
pub fn extra_headers(
self,
value: HeaderMap,
) -> StartSessionParamsBuilder<SetExtraHeaders<S>>where
S::ExtraHeaders: IsUnset,
Sourcepub fn maybe_extra_headers(
self,
value: Option<HeaderMap>,
) -> StartSessionParamsBuilder<SetExtraHeaders<S>>where
S::ExtraHeaders: IsUnset,
pub fn maybe_extra_headers(
self,
value: Option<HeaderMap>,
) -> StartSessionParamsBuilder<SetExtraHeaders<S>>where
S::ExtraHeaders: IsUnset,
Sourcepub fn create(
self,
value: CreateBacktestSessionRequest,
) -> StartSessionParamsBuilder<SetCreate<S>>where
S::Create: IsUnset,
pub fn create(
self,
value: CreateBacktestSessionRequest,
) -> StartSessionParamsBuilder<SetCreate<S>>where
S::Create: IsUnset,
Required.
The create request, built with crate::CreateSession and its into_request. Set
parallel on it to start a ManagedParallelSession.
Sourcepub fn parent_cancel(
self,
value: CancellationToken,
) -> StartSessionParamsBuilder<SetParentCancel<S>>where
S::ParentCancel: IsUnset,
pub fn parent_cancel(
self,
value: CancellationToken,
) -> StartSessionParamsBuilder<SetParentCancel<S>>where
S::ParentCancel: IsUnset,
Optional (Some / Option setters).
Default: <CancellationToken as Default>::default().
Cancelling this aborts startup, or stops a started session; its calls then return
ManagedSessionError::Cancelled from next_event.
Sourcepub fn maybe_parent_cancel(
self,
value: Option<CancellationToken>,
) -> StartSessionParamsBuilder<SetParentCancel<S>>where
S::ParentCancel: IsUnset,
pub fn maybe_parent_cancel(
self,
value: Option<CancellationToken>,
) -> StartSessionParamsBuilder<SetParentCancel<S>>where
S::ParentCancel: IsUnset,
Optional (Some / Option setters).
Default: <CancellationToken as Default>::default().
Cancelling this aborts startup, or stops a started session; its calls then return
ManagedSessionError::Cancelled from next_event.
Sourcepub fn subscription_diagnostics(
self,
value: Arc<SubscriptionDiagnostics>,
) -> StartSessionParamsBuilder<SetSubscriptionDiagnostics<S>>where
S::SubscriptionDiagnostics: IsUnset,
pub fn subscription_diagnostics(
self,
value: Arc<SubscriptionDiagnostics>,
) -> StartSessionParamsBuilder<SetSubscriptionDiagnostics<S>>where
S::SubscriptionDiagnostics: IsUnset,
Sourcepub fn maybe_subscription_diagnostics(
self,
value: Option<Arc<SubscriptionDiagnostics>>,
) -> StartSessionParamsBuilder<SetSubscriptionDiagnostics<S>>where
S::SubscriptionDiagnostics: IsUnset,
pub fn maybe_subscription_diagnostics(
self,
value: Option<Arc<SubscriptionDiagnostics>>,
) -> StartSessionParamsBuilder<SetSubscriptionDiagnostics<S>>where
S::SubscriptionDiagnostics: IsUnset,
Auto Trait Implementations§
impl<S> Forget for StartSessionParamsBuilder<S>
impl<S> Freeze for StartSessionParamsBuilder<S>where
PhantomData<(fn() -> S, fn() -> PhantomData<StartSessionParams>)>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const [Pos] is !null: Freeze,
PhantomData<[Pos]>: Freeze,
PhantomData<Bucket<HeaderValue>>: Freeze,
PhantomData<ExtraValue<HeaderValue>>: Freeze,
*const LeafNode<SwapAggregator, SetValZST> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(SwapAggregator, SetValZST)>>: Freeze,
*const LeafNode<SwapScope, SetValZST> is !null: Freeze,
PhantomData<Box<(SwapScope, SetValZST)>>: Freeze,
*const LeafNode<MintPair, SetValZST> is !null: Freeze,
PhantomData<Box<(MintPair, SetValZST)>>: Freeze,
PhantomData<VenueTemplate>: Freeze,
*const LeafNode<Address, SetValZST> is !null: Freeze,
PhantomData<Box<(Address, SetValZST)>>: Freeze,
PhantomData<DiscoveryFilter>: Freeze,
PhantomData<ScheduledAction>: Freeze,
PhantomData<DiagnosticProbeParams>: Freeze,
*const ArcInner<TreeNode> is !null: Freeze,
PhantomData<ArcInner<TreeNode>>: Freeze,
*const ArcInner<SubscriptionDiagnostics> is !null: Freeze,
PhantomData<ArcInner<SubscriptionDiagnostics>>: Freeze,
impl<S> Move for StartSessionParamsBuilder<S>
impl<S> RefUnwindSafe for StartSessionParamsBuilder<S>where
Atomic<*mut ()>: RefUnwindSafe,
NonZero<u64>: RefUnwindSafe,
CancellationToken: RefUnwindSafe,
Atomic<usize>: RefUnwindSafe,
Atomic<u64>: RefUnwindSafe,
impl<S> Send for StartSessionParamsBuilder<S>where
RawVecInner: Send,
BoxRaw<[Pos]>: Send,
Bytes: Send,
NodeRef<Owned, SwapAggregator, SetValZST, LeafOrInternal>: Send,
BoxRaw<(SwapAggregator, SetValZST)>: Send,
NodeRef<Owned, SwapScope, SetValZST, LeafOrInternal>: Send,
BoxRaw<(SwapScope, SetValZST)>: Send,
NodeRef<Owned, MintPair, SetValZST, LeafOrInternal>: Send,
BoxRaw<(MintPair, SetValZST)>: Send,
NodeRef<Owned, Address, SetValZST, LeafOrInternal>: Send,
BoxRaw<(Address, SetValZST)>: Send,
NonZero<u64>: Send,
NodeRef<Owned, Address, AccountData, LeafOrInternal>: Send,
BoxRaw<(Address, AccountData)>: Send,
Arc<TreeNode>: Send,
Arc<SubscriptionDiagnostics>: Send,
impl<S> Sync for StartSessionParamsBuilder<S>where
RawVecInner: Sync,
BoxRaw<[Pos]>: Sync,
Bytes: Sync,
NodeRef<Owned, SwapAggregator, SetValZST, LeafOrInternal>: Sync,
BoxRaw<(SwapAggregator, SetValZST)>: Sync,
NodeRef<Owned, SwapScope, SetValZST, LeafOrInternal>: Sync,
BoxRaw<(SwapScope, SetValZST)>: Sync,
NodeRef<Owned, MintPair, SetValZST, LeafOrInternal>: Sync,
BoxRaw<(MintPair, SetValZST)>: Sync,
NodeRef<Owned, Address, SetValZST, LeafOrInternal>: Sync,
BoxRaw<(Address, SetValZST)>: Sync,
NonZero<u64>: Sync,
NodeRef<Owned, Address, AccountData, LeafOrInternal>: Sync,
BoxRaw<(Address, AccountData)>: Sync,
Arc<TreeNode>: Sync,
Arc<SubscriptionDiagnostics>: Sync,
impl<S> Unpin for StartSessionParamsBuilder<S>where
*const u8 is !null: Unpin,
Box<[Pos]>: Unpin,
*const u8: Unpin,
Align8<*mut ()>: Unpin,
&'static Vtable: Unpin,
*const LeafNode<SwapAggregator, SetValZST> is !null: Unpin,
Box<(SwapAggregator, SetValZST)>: Unpin,
*const LeafNode<SwapScope, SetValZST> is !null: Unpin,
Box<(SwapScope, SetValZST)>: Unpin,
*const LeafNode<MintPair, SetValZST> is !null: Unpin,
Box<(MintPair, SetValZST)>: Unpin,
*const LeafNode<Address, SetValZST> is !null: Unpin,
Box<(Address, SetValZST)>: Unpin,
NonZero<u64>: Unpin,
*const LeafNode<Address, AccountData> is !null: Unpin,
Box<(Address, AccountData)>: Unpin,
Arc<TreeNode>: Unpin,
Arc<SubscriptionDiagnostics>: Unpin,
impl<S> UnsafeUnpin for StartSessionParamsBuilder<S>where
PhantomData<(fn() -> S, fn() -> PhantomData<StartSessionParams>)>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const [Pos] is !null: UnsafeUnpin,
PhantomData<[Pos]>: UnsafeUnpin,
PhantomData<Bucket<HeaderValue>>: UnsafeUnpin,
PhantomData<ExtraValue<HeaderValue>>: UnsafeUnpin,
*const LeafNode<SwapAggregator, SetValZST> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(SwapAggregator, SetValZST)>>: UnsafeUnpin,
*const LeafNode<SwapScope, SetValZST> is !null: UnsafeUnpin,
PhantomData<Box<(SwapScope, SetValZST)>>: UnsafeUnpin,
*const LeafNode<MintPair, SetValZST> is !null: UnsafeUnpin,
PhantomData<Box<(MintPair, SetValZST)>>: UnsafeUnpin,
PhantomData<VenueTemplate>: UnsafeUnpin,
*const LeafNode<Address, SetValZST> is !null: UnsafeUnpin,
PhantomData<Box<(Address, SetValZST)>>: UnsafeUnpin,
PhantomData<DiscoveryFilter>: UnsafeUnpin,
PhantomData<ScheduledAction>: UnsafeUnpin,
PhantomData<DiagnosticProbeParams>: UnsafeUnpin,
*const ArcInner<TreeNode> is !null: UnsafeUnpin,
PhantomData<ArcInner<TreeNode>>: UnsafeUnpin,
*const ArcInner<SubscriptionDiagnostics> is !null: UnsafeUnpin,
PhantomData<ArcInner<SubscriptionDiagnostics>>: UnsafeUnpin,
impl<S> UnwindSafe for StartSessionParamsBuilder<S>where
RawVecInner: UnwindSafe,
BoxRaw<[Pos]>: UnwindSafe,
*const u8: UnwindSafe,
Align8<*mut ()>: UnwindSafe,
&'static Vtable: UnwindSafe,
BTreeMap<SwapAggregator, SetValZST>: UnwindSafe,
BTreeMap<SwapScope, SetValZST>: UnwindSafe,
BTreeMap<MintPair, SetValZST>: UnwindSafe,
BTreeMap<Address, SetValZST>: UnwindSafe,
NonZero<u64>: UnwindSafe,
BTreeMap<Address, AccountData>: UnwindSafe,
CancellationToken: UnwindSafe,
Arc<SubscriptionDiagnostics>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.