pub struct ScheduledAction {
pub anchor: ActionAnchor,
pub kind: ActionKind,
pub transactions: Vec<String>,
pub account_overrides: AccountModifications,
pub return_accounts: Vec<Address>,
pub label: Option<String>,
}Expand description
A sequence of transactions the server runs automatically during a backtest,
with results streamed over the actionSubscribe subscription. An action carrying
no transactions is declarative instead: it posts account_overrides to the
reroute layer and streams nothing.
Fields§
§anchor: ActionAnchor§kind: ActionKindIgnored when transactions is empty — that action is a schedule entry, not a run.
transactions: Vec<String>Base64-encoded transactions, carried over the wire as a base64-encoded,
zstd-compressed blob. For a slot anchor (beforeSlot/afterSlot),
entry i fires at slots[i] — the two lists must be the same length,
and repeating a slot runs its entries there in order as one sequence.
For match anchors the whole list fires, in order, at each matching
batch. For simulate, each transaction’s writes are visible to the next
without committing to the session ledger. Empty makes the action a
schedule entry for account_overrides instead of a run.
account_overrides: AccountModificationsAccount state overrides, per simulateTransaction modifyAccountStates
semantics. Alongside transactions they seed the first one’s simulation and
are invalid for kind: send; alone they are the whole payload, applied to
the reroute layer at each beforeSlot slot and carried forward per account
until a later action names the same account.
return_accounts: Vec<Address>Accounts whose post-execution state to return, following
simulateTransaction semantics; reflects cumulative state after the
final transaction.
label: Option<String>Optional client tag echoed back on each actionSubscribe result to correlate it to this action.
Implementations§
Source§impl ScheduledAction
impl ScheduledAction
Sourcepub fn is_override(&self) -> bool
pub fn is_override(&self) -> bool
Whether this action posts account_overrides to the reroute layer instead of
running transactions. Carrying none is what makes it declarative.
Trait Implementations§
Source§impl Clone for ScheduledAction
impl Clone for ScheduledAction
Source§fn clone(&self) -> ScheduledAction
fn clone(&self) -> ScheduledAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScheduledAction
impl Debug for ScheduledAction
Source§impl<'de> Deserialize<'de> for ScheduledAction
impl<'de> Deserialize<'de> for ScheduledAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ScheduledAction
impl RefUnwindSafe for ScheduledAction
impl Send for ScheduledAction
impl Sync for ScheduledAction
impl Unpin for ScheduledAction
impl UnsafeUnpin for ScheduledAction
impl UnwindSafe for ScheduledAction
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more