pub struct CreateSession {
pub start_slot: u64,
pub end_slot: Option<u64>,
pub slot_count: Option<u64>,
pub signer_filter: BTreeSet<Address>,
pub preload_programs: BTreeSet<Address>,
pub preload_account_bundles: Vec<String>,
pub send_summary: bool,
pub parallel: bool,
pub disconnect_timeout_secs: Option<u16>,
}Expand description
Builder for CreateBacktestSession.
Set either end_slot or slot_count (not both). Use the helper methods to
add account filters or preload programs.
Fields§
§start_slot: u64§end_slot: Option<u64>§slot_count: Option<u64>§signer_filter: BTreeSet<Address>§preload_programs: BTreeSet<Address>§preload_account_bundles: Vec<String>§send_summary: boolWhen true, include a session summary with transaction statistics in the Completed response.
parallel: boolWhen true, ask manager to create all available sessions in the target epoch.
disconnect_timeout_secs: Option<u16>Implementations§
Source§impl CreateSession
impl CreateSession
Sourcepub fn builder() -> CreateSessionBuilder
pub fn builder() -> CreateSessionBuilder
Create an instance of CreateSession using the builder syntax
Source§impl CreateSession
impl CreateSession
Sourcepub fn add_signer_filter(self, address: Address) -> Self
pub fn add_signer_filter(self, address: Address) -> Self
Add an account to the signer filter.
Sourcepub fn add_preload_program(self, address: Address) -> Self
pub fn add_preload_program(self, address: Address) -> Self
Add a program to preload before the first continue.
Sourcepub fn into_params(self) -> Result<CreateSessionParams, BacktestClientError>
pub fn into_params(self) -> Result<CreateSessionParams, BacktestClientError>
Convert the builder into API parameters, validating slot options.
Sourcepub fn into_request(
self,
) -> Result<CreateBacktestSessionRequest, BacktestClientError>
pub fn into_request( self, ) -> Result<CreateBacktestSessionRequest, BacktestClientError>
Convert the builder into versioned create request payload.
Trait Implementations§
Source§impl Clone for CreateSession
impl Clone for CreateSession
Source§fn clone(&self) -> CreateSession
fn clone(&self) -> CreateSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CreateSession
impl RefUnwindSafe for CreateSession
impl Send for CreateSession
impl Sync for CreateSession
impl Unpin for CreateSession
impl UnsafeUnpin for CreateSession
impl UnwindSafe for CreateSession
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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