Skip to main content

CompactedCanwu

Struct CompactedCanwu 

Source
pub struct CompactedCanwu { /* private fields */ }
Expand description

Public API for a live runtime whose sealed evidence segments are stored by the caller.

Implementations§

Source§

impl CompactedCanwu

Source

pub fn from_checkpoint_and_journal( checkpoint: SimulationCheckpoint, segments: Vec<EvidenceJournalSegment>, ) -> Result<Self, CanwuError>

Source

pub fn from_checkpoint_and_journal_with_plugins( checkpoint: SimulationCheckpoint, segments: Vec<EvidenceJournalSegment>, plugins: &[&dyn SimulationPlugin], ) -> Result<Self, CanwuError>

Source

pub fn evidence_cursor(&self) -> Result<EvidenceCursor, CanwuError>

Source

pub fn checkpoint(&self) -> Result<SimulationCheckpoint, CanwuError>

Source

pub fn outbox_entries(&self) -> Result<Vec<OutboxEntry>, CanwuError>

Source

pub fn outbox_entries_for_segment( &self, segment: &EvidenceJournalSegment, ) -> Result<Vec<OutboxEntry>, CanwuError>

Source

pub fn archived_evidence_receipt( &self, reference: &EvidenceRef, ) -> Option<&ArchivedEvidenceReceipt>

Source

pub fn load_archived_evidence_segment( &self, reference: &EvidenceRef, provider: &dyn ArchiveProvider, ) -> Result<EvidenceJournalSegment, CanwuError>

Source

pub fn seal_evidence( &mut self, ) -> Result<Option<EvidenceJournalSegment>, CanwuError>

Source

pub fn prepare_evidence_seal( &self, ) -> Result<Option<PreparedEvidenceSeal>, CanwuError>

Source

pub fn commit_evidence_seal( &mut self, token: &EvidenceSealToken, provider: &dyn ArchiveProvider, ) -> Result<(), CanwuError>

Source

pub fn snapshot_with_segments( &self, segments: Vec<EvidenceJournalSegment>, ) -> Result<SimulationSnapshot, CanwuError>

Source

pub fn replay_journal_with_segments( &self, segments: Vec<EvidenceJournalSegment>, ) -> Result<ReplayJournal, CanwuError>

Source

pub const fn time(&self) -> SimTime

Source

pub const fn revision(&self) -> u64

Source

pub fn checkpoint_hash(&self) -> &str

Source

pub fn boundary_head_hash(&self) -> Option<&str>

Source

pub fn entities(&self) -> impl Iterator<Item = &EntityRef>

Source

pub fn entity_exists(&self, entity: &EntityRef) -> bool

Source

pub fn world(&self) -> WorldSnapshot

Deprecated detached format-5 compatibility projection.

Source

pub fn person_availability( &self, person: PersonId, ) -> Option<&PersonAvailability>

Trusted host access to a person’s committed life and custody state. None means no change has been committed: the person is alive and free.

Source

pub fn person_availabilities( &self, ) -> impl Iterator<Item = (&PersonId, &PersonAvailability)>

Trusted host access to every committed person availability, in person-ID order. Persons without an entry are alive and free.

Source

pub fn pending_transition_manifests( &self, ) -> impl Iterator<Item = &PendingTransitionManifest>

Trusted host access to the registered transition manifests whose ready boundary has not settled, in manifest-ID order. Settled manifests leave their audit on the boundary record and receipt.

Source

pub fn knowledge(&self) -> &KnowledgeSnapshot

Source

pub fn domain_record( &self, reference: &DomainRecordRef, ) -> Option<&DomainRecord>

Source

pub fn typed_domain_record<T: DomainRecordType>( &self, reference: &TypedDomainRecordRef<T>, ) -> Option<&DomainRecord>

Source

pub fn decision_ticket(&self, id: DecisionTicketId) -> Option<&DecisionTicket>

Source

pub fn decision_controller( &self, id: &str, ) -> Option<&DecisionControllerBinding>

Source

pub fn decision_trace(&self, id: DecisionTraceId) -> Option<&DecisionTrace>

Source

pub fn decision_attempt( &self, id: DecisionRequestId, ) -> Option<&DecisionAttemptRecord>

Source

pub fn decision_hot_state(&self) -> DecisionHotState

Source

pub fn decision_history_location( &self, key: &DecisionHistoryKey, ) -> DecisionHistoryLocation

Source

pub fn decision_history_location_with_provider( &self, key: &DecisionHistoryKey, provider: &dyn DecisionArchiveProvider, ) -> Result<DecisionHistoryLocation, CanwuError>

Source

pub fn submit( &mut self, envelope: CommandEnvelope, ) -> Result<CommandReceipt, CanwuError>

Source

pub fn process_command( &mut self, request: CommandRequest, ) -> Result<CommandOutcome, CanwuError>

Source

pub fn enqueue_command( &mut self, due_at: SimTime, priority: i32, request: CommandRequest, ) -> Result<IngressReceipt, CanwuError>

Source

pub fn enqueue_plugin_ingress( &mut self, request: PluginIngressRequest, ) -> Result<IngressReceipt, CanwuError>

Source

pub fn enqueue_permitted_plugin_ingress( &mut self, request: PluginIngressRequest, permit: &PluginIngressPermit, ) -> Result<IngressReceipt, CanwuError>

Source

pub fn cancel_plugin_ingress( &mut self, ingress_id: IngressId, reason: impl Into<String>, ) -> Result<IngressReceipt, CanwuError>

Withdraws a still-pending plugin ingress item that the host enqueued with Self::enqueue_plugin_ingress, strictly before its due time.

Due, admitted, archived, or already cancelled items fail with ErrorCode::LateIngress; items of internal packet types or items a plugin scheduled inside the engine fail with ErrorCode::InvalidAuthority; unknown IDs fail with ErrorCode::EvidenceUnavailable; non-plugin targets and reasons that are empty, untrimmed, or longer than MAX_INGRESS_CANCELLATION_REASON_BYTES fail with ErrorCode::InvalidPayload; declared read-only runs fail with ErrorCode::InteractionReadOnly. The returned receipt names the terminal IngressPayload::PluginCancellation journal record. The withdrawn item is never admitted, never settles, and nothing is rolled back; snapshots, checkpoint journals, and exact replay preserve the cancellation.

Source

pub fn cancel_permitted_plugin_ingress( &mut self, ingress_id: IngressId, permit: &PluginIngressPermit, reason: impl Into<String>, ) -> Result<IngressReceipt, CanwuError>

Withdraws a still-pending item of an internal packet type through the owning plugin’s opaque registration permit. The permit covers host-enqueued items of that exact type and items the same plugin scheduled inside the engine; timing rules match Self::cancel_plugin_ingress.

Source

pub fn prepare_decision( &self, decision_request_id: DecisionRequestId, command_request_id: Option<CommandRequestId>, ticket_id: DecisionTicketId, policy: &dyn DecisionPolicy, ) -> Result<DecisionEvaluation, CanwuError>

Source

pub fn prepare_decision_at( &self, due_at: SimTime, decision_request_id: DecisionRequestId, command_request_id: Option<CommandRequestId>, ticket_id: DecisionTicketId, policy: &dyn DecisionPolicy, ) -> Result<DecisionEvaluation, CanwuError>

Source

pub fn enqueue_decision( &mut self, due_at: SimTime, priority: i32, request: DecisionIngressRequest, ) -> Result<IngressReceipt, CanwuError>

Source

pub fn drive_decision( &mut self, due_at: SimTime, priority: i32, decision_request_id: DecisionRequestId, command_request_id: Option<CommandRequestId>, ticket_id: DecisionTicketId, policy: &dyn DecisionPolicy, ) -> Result<DecisionEvaluation, CanwuError>

Source

pub fn schedule_calendar_boundary( &mut self, due_at: SimTime, cadences: Vec<SystemCadence>, ) -> Result<IngressReceipt, CanwuError>

Source

pub fn advance( &mut self, duration: SimDuration, ) -> Result<Vec<SimEvent>, CanwuError>

Source

pub fn advance_canonical( &mut self, duration: SimDuration, ) -> Result<Vec<BoundaryReceipt>, CanwuError>

Source

pub fn step_canonical(&mut self) -> Result<Option<BoundaryReceipt>, CanwuError>

Source

pub fn settle_boundary( &mut self, request: BoundaryRequest, ) -> Result<BoundaryReceipt, CanwuError>

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> 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.