pub struct CrossOperationRouter { /* private fields */ }Expand description
Deterministic kernel-side routing state. Every map is converted to an ordered vector at the checkpoint boundary, avoiding map-key JSON encoding quirks in cross-SDK snapshots.
Implementations§
Source§impl CrossOperationRouter
impl CrossOperationRouter
pub fn new(max_pending_per_recipient: usize) -> Self
pub fn register(&mut self, registration: OperationRegistration) -> bool
pub fn operation( &self, address: &OperationAddress, ) -> Option<&OperationRegistration>
pub fn delivery(&self, id: &str) -> Option<&DurableDelivery>
pub fn route( &mut self, message: CrossOperationMessage, now_turn: u32, payload_availability: PayloadAvailability, ) -> RouteOutcome
Sourcepub fn dispatch_next(
&mut self,
receiver: &OperationAddress,
now_turn: u32,
) -> Option<CrossOperationMessage>
pub fn dispatch_next( &mut self, receiver: &OperationAddress, now_turn: u32, ) -> Option<CrossOperationMessage>
Returns the next delivery only after all earlier accepted deliveries for the receiver have settled. Host transport can therefore retry without changing receiver-visible order.
pub fn settle( &mut self, message_id: &str, settlement: DeliverySettlement, now_turn: u32, ) -> Option<DeliveryState>
Sourcepub fn cancel_operation(&mut self, address: &OperationAddress) -> usize
pub fn cancel_operation(&mut self, address: &OperationAddress) -> usize
Cancelling either endpoint is a durable cancellation fact for all nonterminal deliveries touching that operation. A later Host acknowledgement cannot resurrect them.
pub fn snapshot(&self) -> CrossOperationRouterSnapshot
pub fn from_snapshot( snapshot: CrossOperationRouterSnapshot, ) -> Result<Self, SnapshotError>
Trait Implementations§
Source§impl Clone for CrossOperationRouter
impl Clone for CrossOperationRouter
Source§fn clone(&self) -> CrossOperationRouter
fn clone(&self) -> CrossOperationRouter
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 CrossOperationRouter
impl Debug for CrossOperationRouter
Source§impl Default for CrossOperationRouter
impl Default for CrossOperationRouter
Source§fn default() -> CrossOperationRouter
fn default() -> CrossOperationRouter
Returns the “default value” for a type. Read more
impl Eq for CrossOperationRouter
Source§impl PartialEq for CrossOperationRouter
impl PartialEq for CrossOperationRouter
impl StructuralPartialEq for CrossOperationRouter
Auto Trait Implementations§
impl Freeze for CrossOperationRouter
impl RefUnwindSafe for CrossOperationRouter
impl Send for CrossOperationRouter
impl Sync for CrossOperationRouter
impl Unpin for CrossOperationRouter
impl UnsafeUnpin for CrossOperationRouter
impl UnwindSafe for CrossOperationRouter
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