Skip to main content

LoadedRun

Struct LoadedRun 

pub struct LoadedRun {
Show 21 fields pub id: Name, pub wtype: Name, pub version: u32, pub codec: u8, pub parent: Option<ParentRef>, pub started_ms: u64, pub deadline_ms: u64, pub last_lsn: Lsn, pub done: Option<(Status, u64)>, pub result: Option<Payload>, pub blob: Option<BlobRef>, pub blob_chain: u64, pub blob_depth: u8, pub journal: Vec<u8>, pub journal_records: u32, pub policy: u8, pub from: Option<Origin>, pub updates: Vec<UpdateSlot>, pub awaiting: FxHashMap<Seq, u32>, pub attrs: Vec<Payload>, pub streams: bool, /* private fields */
}
Expand description

A run held in memory.

Fields§

§id: Name§wtype: Name§version: u32§codec: u8§parent: Option<ParentRef>§started_ms: u64§deadline_ms: u64§last_lsn: Lsn§done: Option<(Status, u64)>§result: Option<Payload>§blob: Option<BlobRef>

Journal prefix stored in the run store, if any: its newest frame.

§blob_chain: u64

Bytes of blob and the frames it extends (see crate::store::StoreEntry::Delta), and how many frames it extends.

§blob_depth: u8§journal: Vec<u8>

Canonical records after blob.

§journal_records: u32§policy: u8§from: Option<Origin>§updates: Vec<UpdateSlot>

Accepted updates by ordinal, and their IDs.

§awaiting: FxHashMap<Seq, u32>

Async completions whose token is out: seq → attempt.

§attrs: Vec<Payload>

Search attribute objects in the order they were set.

§streams: bool

The journal holds stream records (Chunk, StreamEnd), which a finished run’s summary keeps.

Implementations§

§

impl LoadedRun

pub fn is_done(&self) -> bool

pub fn has_queued_events(&self) -> bool

Whether an event for the run (a fired timer, an offered signal) is still queued for the host. Such a run is about to continue: parking it now would drop the fired timer, which only its event delivers.

pub fn armed_timers(&self) -> impl Iterator<Item = (Seq, TimerKind, u64)> + '_

Nothing can make progress without an outside event: every pending operation is a timer or a wait.

pub fn waiting_on(&self) -> impl Iterator<Item = (Seq, &str)> + '_

pub fn pending_children(&self) -> &[Seq] ⓘ

pub fn buffered_signals(&self) -> usize

pub fn update(&self, id: &str) -> Option<(u64, &UpdateSlot)>

The accepted update with this ID, if any: its ordinal and slot.

Trait Implementations§

§

impl Clone for LoadedRun

§

fn clone(&self) -> LoadedRun

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for LoadedRun

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.