pub struct MCardSyncEngine {
pub node_id: String,
pub is_disposed: bool,
pub records: BTreeMap<String, MCardRecord>,
pub handle_markings: BTreeMap<String, BTreeMap<String, i64>>,
pub handle_heads: BTreeMap<String, Option<String>>,
pub handle_clocks: BTreeMap<String, BTreeMap<String, u64>>,
pub transitions: Vec<TransitionPayload>,
pub committed_transfers: BTreeSet<String>,
pub outbox: BTreeMap<String, SyncOutboxEntry>,
pub transfer_marking: BTreeMap<String, i64>,
pub transport: Option<Box<dyn SyncFrameTransport>>,
pub outbox_port: Option<Box<dyn SyncOutboxPort>>,
}Fields§
§node_id: String§is_disposed: bool§records: BTreeMap<String, MCardRecord>§handle_markings: BTreeMap<String, BTreeMap<String, i64>>§handle_heads: BTreeMap<String, Option<String>>§handle_clocks: BTreeMap<String, BTreeMap<String, u64>>§transitions: Vec<TransitionPayload>§committed_transfers: BTreeSet<String>§outbox: BTreeMap<String, SyncOutboxEntry>§transfer_marking: BTreeMap<String, i64>§transport: Option<Box<dyn SyncFrameTransport>>§outbox_port: Option<Box<dyn SyncOutboxPort>>Implementations§
Source§impl MCardSyncEngine
impl MCardSyncEngine
pub fn enqueue_transfer( &mut self, target_node_id: &str, records: Vec<RecordFrame>, transitions: Vec<TransitionPayload>, disambiguator: &str, ) -> Result<SyncOutboxEntry, SyncContractError>
Sourcepub fn flush_outbox(
&mut self,
) -> Result<Vec<SyncOutboxEntry>, SyncContractError>
pub fn flush_outbox( &mut self, ) -> Result<Vec<SyncOutboxEntry>, SyncContractError>
Flush eligible outbox entries through the transport. The exact durable entry must exist before any network I/O; transport errors are treated as transient and keep the entry retryable.
pub fn retry_transfer(&mut self, delivery_id: &str) -> RetryOutcome
Source§impl MCardSyncEngine
impl MCardSyncEngine
pub fn new(node_id: &str) -> Self
pub fn new_with_ports( node_id: &str, transport: Option<Box<dyn SyncFrameTransport>>, outbox_port: Option<Box<dyn SyncOutboxPort>>, ) -> Self
pub fn default_lifecycle_marking() -> BTreeMap<String, i64>
pub fn admit_record_frame( &mut self, frame: &RecordFrame, ) -> Result<(String, bool), (String, String)>
pub fn apply_transition( &mut self, transition_id: &str, payload: &TransitionPayload, record_frames: &[RecordFrame], ) -> TransitionGateResult
pub fn receive_attempt( &mut self, attempt: &TransferAttempt, records: &[RecordFrame], ) -> ReceiveOutcome
Sourcepub fn receive_transfer(
&mut self,
transfer_id: &str,
records: &[RecordFrame],
) -> Result<bool, (String, String)>
pub fn receive_transfer( &mut self, transfer_id: &str, records: &[RecordFrame], ) -> Result<bool, (String, String)>
Legacy inbound API preserved for backward compatibility. Prefer
receive_attempt for full declared-hash and transition validation.
pub fn dispose(&mut self)
Trait Implementations§
Source§impl Drop for MCardSyncEngine
impl Drop for MCardSyncEngine
Auto Trait Implementations§
impl !RefUnwindSafe for MCardSyncEngine
impl !UnwindSafe for MCardSyncEngine
impl Forget for MCardSyncEngine
impl Freeze for MCardSyncEngine
impl Send for MCardSyncEngine
impl Sync for MCardSyncEngine
impl Unpin for MCardSyncEngine
impl UnsafeUnpin for MCardSyncEngine
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