pub struct Replay { /* private fields */ }Expand description
A replayed scenario day.
Implementations§
Source§impl Replay
impl Replay
Sourcepub fn new(
scenario: Scenario,
rules: RuleBook,
data: Option<&str>,
) -> Result<Self, ReplayError>
pub fn new( scenario: Scenario, rules: RuleBook, data: Option<&str>, ) -> Result<Self, ReplayError>
Builds the replay of scenario. data is the text of the scenario’s data file, if any.
§Errors
ReplayError if a rule is missing for the day or the data is invalid.
Sourcepub const fn series(&self) -> &Series
pub const fn series(&self) -> &Series
The bitemporal day-ahead prices: the replayed day and its history.
Sourcepub const fn business_day(&self) -> &BusinessDay
pub const fn business_day(&self) -> &BusinessDay
The delivery day replayed.
Sourcepub const fn publication(&self) -> OffsetDateTime
pub const fn publication(&self) -> OffsetDateTime
When the day-ahead prices are published.
Sourcepub fn day_ahead(&self) -> Option<DayAhead<'_>>
pub fn day_ahead(&self) -> Option<DayAhead<'_>>
The day-ahead result as known now, or None before publication.
Sourcepub fn run_to_end(self) -> String
pub fn run_to_end(self) -> String
Runs to the end and returns a deterministic summary.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Replay
impl Freeze for Replaywhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
NonZero<i32>: Freeze,
PhantomData<Fault>: Freeze,
*const LeafNode<String, Source> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Source)>>: Freeze,
*const LeafNode<String, Vec<Entry>> is !null: Freeze,
PhantomData<Box<(String, Vec<Entry>)>>: Freeze,
PhantomData<Event>: Freeze,
*const LeafNode<OffsetDateTime, Vec<Observation>> is !null: Freeze,
PhantomData<Box<(OffsetDateTime, Vec<Observation>)>>: Freeze,
impl Move for Replay
impl RefUnwindSafe for Replay
impl Send for Replaywhere
RawVecInner: Send,
NonZero<i32>: Send,
NodeRef<Owned, String, Source, LeafOrInternal>: Send,
BoxRaw<(String, Source)>: Send,
NodeRef<Owned, String, Vec<Entry>, LeafOrInternal>: Send,
BoxRaw<(String, Vec<Entry>)>: Send,
NodeRef<Owned, OffsetDateTime, Vec<Observation>, LeafOrInternal>: Send,
BoxRaw<(OffsetDateTime, Vec<Observation>)>: Send,
impl Sync for Replaywhere
RawVecInner: Sync,
NonZero<i32>: Sync,
NodeRef<Owned, String, Source, LeafOrInternal>: Sync,
BoxRaw<(String, Source)>: Sync,
NodeRef<Owned, String, Vec<Entry>, LeafOrInternal>: Sync,
BoxRaw<(String, Vec<Entry>)>: Sync,
NodeRef<Owned, OffsetDateTime, Vec<Observation>, LeafOrInternal>: Sync,
BoxRaw<(OffsetDateTime, Vec<Observation>)>: Sync,
impl Unpin for Replaywhere
*const u8 is !null: Unpin,
NonZero<i32>: Unpin,
*const LeafNode<String, Source> is !null: Unpin,
Box<(String, Source)>: Unpin,
*const LeafNode<String, Vec<Entry>> is !null: Unpin,
Box<(String, Vec<Entry>)>: Unpin,
*const LeafNode<OffsetDateTime, Vec<Observation>> is !null: Unpin,
Box<(OffsetDateTime, Vec<Observation>)>: Unpin,
impl UnsafeUnpin for Replaywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
PhantomData<Fault>: UnsafeUnpin,
*const LeafNode<String, Source> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Source)>>: UnsafeUnpin,
*const LeafNode<String, Vec<Entry>> is !null: UnsafeUnpin,
PhantomData<Box<(String, Vec<Entry>)>>: UnsafeUnpin,
PhantomData<Event>: UnsafeUnpin,
*const LeafNode<OffsetDateTime, Vec<Observation>> is !null: UnsafeUnpin,
PhantomData<Box<(OffsetDateTime, Vec<Observation>)>>: UnsafeUnpin,
impl UnwindSafe for Replaywhere
RawVecInner: UnwindSafe,
NonZero<i32>: UnwindSafe,
BTreeMap<String, Source>: UnwindSafe,
BTreeMap<String, Vec<Entry>>: UnwindSafe,
BTreeMap<OffsetDateTime, Vec<Observation>>: 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
Mutably borrows from an owned value. Read more