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
impl CompactedCanwu
pub fn from_checkpoint_and_journal( checkpoint: SimulationCheckpoint, segments: Vec<EvidenceJournalSegment>, ) -> Result<Self, CanwuError>
pub fn from_checkpoint_and_journal_with_plugins( checkpoint: SimulationCheckpoint, segments: Vec<EvidenceJournalSegment>, plugins: &[&dyn SimulationPlugin], ) -> Result<Self, CanwuError>
pub fn evidence_cursor(&self) -> Result<EvidenceCursor, CanwuError>
pub fn checkpoint(&self) -> Result<SimulationCheckpoint, CanwuError>
pub fn outbox_entries(&self) -> Result<Vec<OutboxEntry>, CanwuError>
pub fn outbox_entries_for_segment( &self, segment: &EvidenceJournalSegment, ) -> Result<Vec<OutboxEntry>, CanwuError>
pub fn archived_evidence_receipt( &self, reference: &EvidenceRef, ) -> Option<&ArchivedEvidenceReceipt>
pub fn load_archived_evidence_segment( &self, reference: &EvidenceRef, provider: &dyn ArchiveProvider, ) -> Result<EvidenceJournalSegment, CanwuError>
pub fn seal_evidence( &mut self, ) -> Result<Option<EvidenceJournalSegment>, CanwuError>
pub fn prepare_evidence_seal( &self, ) -> Result<Option<PreparedEvidenceSeal>, CanwuError>
pub fn commit_evidence_seal( &mut self, token: &EvidenceSealToken, provider: &dyn ArchiveProvider, ) -> Result<(), CanwuError>
pub fn snapshot_with_segments( &self, segments: Vec<EvidenceJournalSegment>, ) -> Result<SimulationSnapshot, CanwuError>
pub fn replay_journal_with_segments( &self, segments: Vec<EvidenceJournalSegment>, ) -> Result<ReplayJournal, CanwuError>
pub const fn time(&self) -> SimTime
pub const fn revision(&self) -> u64
pub fn checkpoint_hash(&self) -> &str
pub fn boundary_head_hash(&self) -> Option<&str>
pub fn entities(&self) -> impl Iterator<Item = &EntityRef>
pub fn entity_exists(&self, entity: &EntityRef) -> bool
Sourcepub fn world(&self) -> WorldSnapshot
pub fn world(&self) -> WorldSnapshot
Deprecated detached format-5 compatibility projection.
Sourcepub fn person_availability(
&self,
person: PersonId,
) -> Option<&PersonAvailability>
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.
Sourcepub fn person_availabilities(
&self,
) -> impl Iterator<Item = (&PersonId, &PersonAvailability)>
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.
Sourcepub fn pending_transition_manifests(
&self,
) -> impl Iterator<Item = &PendingTransitionManifest>
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.
pub fn knowledge(&self) -> &KnowledgeSnapshot
pub fn domain_record( &self, reference: &DomainRecordRef, ) -> Option<&DomainRecord>
pub fn typed_domain_record<T: DomainRecordType>( &self, reference: &TypedDomainRecordRef<T>, ) -> Option<&DomainRecord>
pub fn decision_ticket(&self, id: DecisionTicketId) -> Option<&DecisionTicket>
pub fn decision_controller( &self, id: &str, ) -> Option<&DecisionControllerBinding>
pub fn decision_trace(&self, id: DecisionTraceId) -> Option<&DecisionTrace>
pub fn decision_attempt( &self, id: DecisionRequestId, ) -> Option<&DecisionAttemptRecord>
pub fn decision_hot_state(&self) -> DecisionHotState
pub fn decision_history_location( &self, key: &DecisionHistoryKey, ) -> DecisionHistoryLocation
pub fn decision_history_location_with_provider( &self, key: &DecisionHistoryKey, provider: &dyn DecisionArchiveProvider, ) -> Result<DecisionHistoryLocation, CanwuError>
pub fn submit( &mut self, envelope: CommandEnvelope, ) -> Result<CommandReceipt, CanwuError>
pub fn process_command( &mut self, request: CommandRequest, ) -> Result<CommandOutcome, CanwuError>
pub fn enqueue_command( &mut self, due_at: SimTime, priority: i32, request: CommandRequest, ) -> Result<IngressReceipt, CanwuError>
pub fn enqueue_plugin_ingress( &mut self, request: PluginIngressRequest, ) -> Result<IngressReceipt, CanwuError>
pub fn enqueue_permitted_plugin_ingress( &mut self, request: PluginIngressRequest, permit: &PluginIngressPermit, ) -> Result<IngressReceipt, CanwuError>
Sourcepub fn cancel_plugin_ingress(
&mut self,
ingress_id: IngressId,
reason: impl Into<String>,
) -> Result<IngressReceipt, CanwuError>
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.
Sourcepub fn cancel_permitted_plugin_ingress(
&mut self,
ingress_id: IngressId,
permit: &PluginIngressPermit,
reason: impl Into<String>,
) -> Result<IngressReceipt, CanwuError>
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.