pub struct CreateSessionParamsBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> CreateSessionParamsBuilder<S>
impl<S: State> CreateSessionParamsBuilder<S>
Sourcepub fn build(self) -> CreateSessionParamswhere
S: IsComplete,
pub fn build(self) -> CreateSessionParamswhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn start_slot(
self,
value: u64,
) -> CreateSessionParamsBuilder<SetStartSlot<S>>where
S::StartSlot: IsUnset,
pub fn start_slot(
self,
value: u64,
) -> CreateSessionParamsBuilder<SetStartSlot<S>>where
S::StartSlot: IsUnset,
Required.
First slot (inclusive) to replay.
Sourcepub fn end_slot(self, value: u64) -> CreateSessionParamsBuilder<SetEndSlot<S>>where
S::EndSlot: IsUnset,
pub fn end_slot(self, value: u64) -> CreateSessionParamsBuilder<SetEndSlot<S>>where
S::EndSlot: IsUnset,
Required.
Last slot (inclusive) to replay.
Sourcepub fn send_summary(
self,
value: bool,
) -> CreateSessionParamsBuilder<SetSendSummary<S>>where
S::SendSummary: IsUnset,
pub fn send_summary(
self,
value: bool,
) -> CreateSessionParamsBuilder<SetSendSummary<S>>where
S::SendSummary: IsUnset,
Sourcepub fn maybe_send_summary(
self,
value: Option<bool>,
) -> CreateSessionParamsBuilder<SetSendSummary<S>>where
S::SendSummary: IsUnset,
pub fn maybe_send_summary(
self,
value: Option<bool>,
) -> CreateSessionParamsBuilder<SetSendSummary<S>>where
S::SendSummary: IsUnset,
Sourcepub fn reroute(
self,
value: RerouteParams,
) -> CreateSessionParamsBuilder<SetReroute<S>>where
S::Reroute: IsUnset,
pub fn reroute(
self,
value: RerouteParams,
) -> CreateSessionParamsBuilder<SetReroute<S>>where
S::Reroute: IsUnset,
Sourcepub fn maybe_reroute(
self,
value: Option<RerouteParams>,
) -> CreateSessionParamsBuilder<SetReroute<S>>where
S::Reroute: IsUnset,
pub fn maybe_reroute(
self,
value: Option<RerouteParams>,
) -> CreateSessionParamsBuilder<SetReroute<S>>where
S::Reroute: IsUnset,
Sourcepub fn capacity_wait_timeout_secs(
self,
value: u16,
) -> CreateSessionParamsBuilder<SetCapacityWaitTimeoutSecs<S>>where
S::CapacityWaitTimeoutSecs: IsUnset,
pub fn capacity_wait_timeout_secs(
self,
value: u16,
) -> CreateSessionParamsBuilder<SetCapacityWaitTimeoutSecs<S>>where
S::CapacityWaitTimeoutSecs: IsUnset,
Sourcepub fn maybe_capacity_wait_timeout_secs(
self,
value: Option<u16>,
) -> CreateSessionParamsBuilder<SetCapacityWaitTimeoutSecs<S>>where
S::CapacityWaitTimeoutSecs: IsUnset,
pub fn maybe_capacity_wait_timeout_secs(
self,
value: Option<u16>,
) -> CreateSessionParamsBuilder<SetCapacityWaitTimeoutSecs<S>>where
S::CapacityWaitTimeoutSecs: IsUnset,
Sourcepub fn disconnect_timeout_secs(
self,
value: u16,
) -> CreateSessionParamsBuilder<SetDisconnectTimeoutSecs<S>>where
S::DisconnectTimeoutSecs: IsUnset,
pub fn disconnect_timeout_secs(
self,
value: u16,
) -> CreateSessionParamsBuilder<SetDisconnectTimeoutSecs<S>>where
S::DisconnectTimeoutSecs: IsUnset,
Optional (Some / Option setters).
Maximum seconds to keep the session alive after the control websocket disconnects.
If not set (or 0), the session tears down immediately on disconnect.
Clamped to MAX_DISCONNECT_TIMEOUT_SECS (900 seconds / 15 minutes).
Sourcepub fn maybe_disconnect_timeout_secs(
self,
value: Option<u16>,
) -> CreateSessionParamsBuilder<SetDisconnectTimeoutSecs<S>>where
S::DisconnectTimeoutSecs: IsUnset,
pub fn maybe_disconnect_timeout_secs(
self,
value: Option<u16>,
) -> CreateSessionParamsBuilder<SetDisconnectTimeoutSecs<S>>where
S::DisconnectTimeoutSecs: IsUnset,
Optional (Some / Option setters).
Maximum seconds to keep the session alive after the control websocket disconnects.
If not set (or 0), the session tears down immediately on disconnect.
Clamped to MAX_DISCONNECT_TIMEOUT_SECS (900 seconds / 15 minutes).
Sourcepub fn extra_compute_units(
self,
value: u32,
) -> CreateSessionParamsBuilder<SetExtraComputeUnits<S>>where
S::ExtraComputeUnits: IsUnset,
pub fn extra_compute_units(
self,
value: u32,
) -> CreateSessionParamsBuilder<SetExtraComputeUnits<S>>where
S::ExtraComputeUnits: IsUnset,
Optional (Some / Option setters).
Extra compute units to add to each transaction’s SetComputeUnitLimit budget.
Useful when replaying with an account override whose program uses more CU than
the original, causing otherwise-healthy transactions to run out of budget.
Only applied when a SetComputeUnitLimit instruction is already present.
Sourcepub fn maybe_extra_compute_units(
self,
value: Option<u32>,
) -> CreateSessionParamsBuilder<SetExtraComputeUnits<S>>where
S::ExtraComputeUnits: IsUnset,
pub fn maybe_extra_compute_units(
self,
value: Option<u32>,
) -> CreateSessionParamsBuilder<SetExtraComputeUnits<S>>where
S::ExtraComputeUnits: IsUnset,
Optional (Some / Option setters).
Extra compute units to add to each transaction’s SetComputeUnitLimit budget.
Useful when replaying with an account override whose program uses more CU than
the original, causing otherwise-healthy transactions to run out of budget.
Only applied when a SetComputeUnitLimit instruction is already present.
Sourcepub fn discoveries(
self,
value: Vec<DiscoveryFilter>,
) -> CreateSessionParamsBuilder<SetDiscoveries<S>>where
S::Discoveries: IsUnset,
pub fn discoveries(
self,
value: Vec<DiscoveryFilter>,
) -> CreateSessionParamsBuilder<SetDiscoveries<S>>where
S::Discoveries: IsUnset,
Optional (Some / Option setters).
Default: <Vec<DiscoveryFilter> as Default>::default().
Events of interest the session should watch for. When an upcoming
batch matches any filter, the server emits
BacktestResponse::DiscoveryBatch (and its session-event twins)
ahead of execution so the client can follow up with
BacktestRequest::ContinueTo to pause before the batch. Empty
means no batch discoveries are performed (existing behaviour).
Sourcepub fn maybe_discoveries(
self,
value: Option<Vec<DiscoveryFilter>>,
) -> CreateSessionParamsBuilder<SetDiscoveries<S>>where
S::Discoveries: IsUnset,
pub fn maybe_discoveries(
self,
value: Option<Vec<DiscoveryFilter>>,
) -> CreateSessionParamsBuilder<SetDiscoveries<S>>where
S::Discoveries: IsUnset,
Optional (Some / Option setters).
Default: <Vec<DiscoveryFilter> as Default>::default().
Events of interest the session should watch for. When an upcoming
batch matches any filter, the server emits
BacktestResponse::DiscoveryBatch (and its session-event twins)
ahead of execution so the client can follow up with
BacktestRequest::ContinueTo to pause before the batch. Empty
means no batch discoveries are performed (existing behaviour).
Sourcepub fn actions(
self,
value: Vec<ScheduledAction>,
) -> CreateSessionParamsBuilder<SetActions<S>>where
S::Actions: IsUnset,
pub fn actions(
self,
value: Vec<ScheduledAction>,
) -> CreateSessionParamsBuilder<SetActions<S>>where
S::Actions: IsUnset,
Optional (Some / Option setters).
Default: <Vec<ScheduledAction> as Default>::default().
Transactions the server runs automatically during the backtest, with
results streamed over actionSubscribe.
Compressed as a whole rather than per action: a per-slot schedule repeats near-identical account bytes thousands of times, and that redundancy is only visible across actions. Compressing each action alone leaves a 10k-slot schedule near the websocket message limit; compressing the vector takes the same schedule from ~28 MiB to ~1 MiB.
Sourcepub fn maybe_actions(
self,
value: Option<Vec<ScheduledAction>>,
) -> CreateSessionParamsBuilder<SetActions<S>>where
S::Actions: IsUnset,
pub fn maybe_actions(
self,
value: Option<Vec<ScheduledAction>>,
) -> CreateSessionParamsBuilder<SetActions<S>>where
S::Actions: IsUnset,
Optional (Some / Option setters).
Default: <Vec<ScheduledAction> as Default>::default().
Transactions the server runs automatically during the backtest, with
results streamed over actionSubscribe.
Compressed as a whole rather than per action: a per-slot schedule repeats near-identical account bytes thousands of times, and that redundancy is only visible across actions. Compressing each action alone leaves a 10k-slot schedule near the websocket message limit; compressing the vector takes the same schedule from ~28 MiB to ~1 MiB.