pub struct ProcessRecord {Show 16 fields
pub id: String,
pub registration_hash: String,
pub input: Arc<ProcessInput>,
pub disposition: RecoveryDisposition,
pub identity: ProcessIdentity,
pub event_types: Vec<ProcessEventType>,
pub provenance: ProcessProvenance,
pub env_ref: Option<ProcessExecutionEnvRef>,
pub wake_target: Option<SessionScope>,
pub created_at_ms: u64,
pub updated_at_ms: u64,
pub external_ref: Option<ProcessExternalRef>,
pub first_started: Option<Box<ProcessStarted>>,
pub abandon_request: Option<Box<AbandonRequest>>,
pub wait: Option<WaitState>,
pub status: ProcessStatus,
}Expand description
Durable process row. Session-visible addressability lives in
ProcessHandleGrant, not in the process record.
Fields§
§id: String§registration_hash: String§input: Arc<ProcessInput>§disposition: RecoveryDispositionDeclared recovery contract. Required with no serde default: pre-column durable rows cannot deserialize and are handled by each store’s schema version bump (reject-and-recreate), never by an API/serde default.
identity: ProcessIdentity§event_types: Vec<ProcessEventType>§provenance: ProcessProvenance§env_ref: Option<ProcessExecutionEnvRef>§wake_target: Option<SessionScope>§created_at_ms: u64§updated_at_ms: u64§external_ref: Option<ProcessExternalRef>§first_started: Option<Box<ProcessStarted>>Durable, lease-fenced execution-started fact (ADR 0019). None until a
runner records it immediately before executing. Boxed so these
usually-absent facts do not enlarge the pervasive ProcessRecord that
flows through the runtime; serde treats Option<Box<T>> identically to
Option<T>, so the persisted JSON is unchanged.
abandon_request: Option<Box<AbandonRequest>>Pending Abandon Request the sweep reconciles once the lease lapses.
wait: Option<WaitState>§status: ProcessStatusImplementations§
Source§impl ProcessRecord
impl ProcessRecord
pub fn from_registration(registration: ProcessRegistration) -> ProcessRecord
pub fn from_registration_with_clock( registration: ProcessRegistration, clock: &dyn Clock, ) -> ProcessRecord
pub fn from_prepared_registration( registration: ProcessRegistration, registration_hash: String, now_ms: u64, ) -> ProcessRecord
pub fn is_terminal(&self) -> bool
pub fn clear_wake_target_for_session(&mut self, session_id: &str) -> bool
pub fn clear_wake_target_for_session_with_clock( &mut self, session_id: &str, clock: &dyn Clock, ) -> bool
pub fn originator_scope_id(&self) -> String
Trait Implementations§
Source§impl Clone for ProcessRecord
impl Clone for ProcessRecord
Source§fn clone(&self) -> ProcessRecord
fn clone(&self) -> ProcessRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProcessRecord
impl Debug for ProcessRecord
Source§impl<'de> Deserialize<'de> for ProcessRecord
impl<'de> Deserialize<'de> for ProcessRecord
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProcessRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProcessRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ProcessRecord
impl Serialize for ProcessRecord
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<ProcessRecord> for RemoteProcessStartResult
impl TryFrom<ProcessRecord> for RemoteProcessStartResult
Source§type Error = RemoteProtocolError
type Error = RemoteProtocolError
The type returned in the event of a conversion error.
Source§fn try_from(
value: ProcessRecord,
) -> Result<RemoteProcessStartResult, <RemoteProcessStartResult as TryFrom<ProcessRecord>>::Error>
fn try_from( value: ProcessRecord, ) -> Result<RemoteProcessStartResult, <RemoteProcessStartResult as TryFrom<ProcessRecord>>::Error>
Performs the conversion.
Source§impl TryFrom<RemoteProcessRecord> for ProcessRecord
impl TryFrom<RemoteProcessRecord> for ProcessRecord
Source§type Error = RemoteProtocolError
type Error = RemoteProtocolError
The type returned in the event of a conversion error.
Source§fn try_from(
value: RemoteProcessRecord,
) -> Result<ProcessRecord, <ProcessRecord as TryFrom<RemoteProcessRecord>>::Error>
fn try_from( value: RemoteProcessRecord, ) -> Result<ProcessRecord, <ProcessRecord as TryFrom<RemoteProcessRecord>>::Error>
Performs the conversion.
Source§impl TryFrom<RemoteProcessStartResult> for ProcessRecord
impl TryFrom<RemoteProcessStartResult> for ProcessRecord
Source§type Error = RemoteProtocolError
type Error = RemoteProtocolError
The type returned in the event of a conversion error.
Source§fn try_from(
value: RemoteProcessStartResult,
) -> Result<ProcessRecord, <ProcessRecord as TryFrom<RemoteProcessStartResult>>::Error>
fn try_from( value: RemoteProcessStartResult, ) -> Result<ProcessRecord, <ProcessRecord as TryFrom<RemoteProcessStartResult>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl !RefUnwindSafe for ProcessRecord
impl !UnwindSafe for ProcessRecord
impl Freeze for ProcessRecord
impl Send for ProcessRecord
impl Sync for ProcessRecord
impl Unpin for ProcessRecord
impl UnsafeUnpin for ProcessRecord
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