Skip to main content

CreateSessionParamsBuilder

Struct CreateSessionParamsBuilder 

Source
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>

Source

pub fn build(self) -> CreateSessionParams
where S: IsComplete,

Finish building and return the requested object

Source

pub fn start_slot( self, value: u64, ) -> CreateSessionParamsBuilder<SetStartSlot<S>>
where S::StartSlot: IsUnset,

Required.

First slot (inclusive) to replay.

Source

pub fn end_slot(self, value: u64) -> CreateSessionParamsBuilder<SetEndSlot<S>>
where S::EndSlot: IsUnset,

Required.

Last slot (inclusive) to replay.

Source

pub fn signer_filter( self, value: BTreeSet<Address>, ) -> CreateSessionParamsBuilder<SetSignerFilter<S>>
where S::SignerFilter: IsUnset,

Optional (Some / Option setters). Default: <BTreeSet<Address> as Default>::default().

Skip transactions signed by these addresses.

Source

pub fn maybe_signer_filter( self, value: Option<BTreeSet<Address>>, ) -> CreateSessionParamsBuilder<SetSignerFilter<S>>
where S::SignerFilter: IsUnset,

Optional (Some / Option setters). Default: <BTreeSet<Address> as Default>::default().

Skip transactions signed by these addresses.

Source

pub fn send_summary( self, value: bool, ) -> CreateSessionParamsBuilder<SetSendSummary<S>>
where S::SendSummary: IsUnset,

Optional (Some / Option setters). Default: false.

When true, include a session summary with transaction statistics in client-facing Completed responses. Summary generation remains enabled internally for metrics.

Source

pub fn maybe_send_summary( self, value: Option<bool>, ) -> CreateSessionParamsBuilder<SetSendSummary<S>>
where S::SendSummary: IsUnset,

Optional (Some / Option setters). Default: false.

When true, include a session summary with transaction statistics in client-facing Completed responses. Summary generation remains enabled internally for metrics.

Source

pub fn capacity_wait_timeout_secs( self, value: u16, ) -> CreateSessionParamsBuilder<SetCapacityWaitTimeoutSecs<S>>
where S::CapacityWaitTimeoutSecs: IsUnset,

Optional (Some / Option setters).

Maximum seconds to wait for ECS capacity-related startup retries before failing session creation. If not set (or 0), capacity errors fail immediately.

Source

pub fn maybe_capacity_wait_timeout_secs( self, value: Option<u16>, ) -> CreateSessionParamsBuilder<SetCapacityWaitTimeoutSecs<S>>
where S::CapacityWaitTimeoutSecs: IsUnset,

Optional (Some / Option setters).

Maximum seconds to wait for ECS capacity-related startup retries before failing session creation. If not set (or 0), capacity errors fail immediately.

Source

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. Maximum value: 900 (15 minutes).

Source

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. Maximum value: 900 (15 minutes).

Source

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.

Source

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.

Source

pub fn agents( self, value: Vec<AgentParams>, ) -> CreateSessionParamsBuilder<SetAgents<S>>
where S::Agents: IsUnset,

Optional (Some / Option setters). Default: <Vec<AgentParams> as Default>::default().

Agent configurations to run as sidecars alongside this session.

Source

pub fn maybe_agents( self, value: Option<Vec<AgentParams>>, ) -> CreateSessionParamsBuilder<SetAgents<S>>
where S::Agents: IsUnset,

Optional (Some / Option setters). Default: <Vec<AgentParams> as Default>::default().

Agent configurations to run as sidecars alongside this session.

Source

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).

Source

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).

Source

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.

Source

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.