pub struct RemoteFrameDedup { /* private fields */ }Expand description
Sliding-window replay filter for crate::Runtime::deliver_frame.
Reservations are transactional: the key is marked DedupState::Pending
before delivery and only becomes DedupState::Accepted after the
mailbox accepts the hop. A failed delivery rolls back so the host may
retransmit.
Implementations§
Source§impl RemoteFrameDedup
impl RemoteFrameDedup
pub fn new(capacity: usize) -> Arc<Self> ⓘ
Sourcepub fn reserve(
&self,
sender: u64,
request_id: u64,
) -> Result<DedupTicket, RuntimeError>
pub fn reserve( &self, sender: u64, request_id: u64, ) -> Result<DedupTicket, RuntimeError>
Atomically reserve (sender, request_id) for delivery.
If another worker holds DedupState::Pending on the same key, this
waits until that peer commits or rolls back.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RemoteFrameDedup
impl RefUnwindSafe for RemoteFrameDedup
impl Send for RemoteFrameDedup
impl Sync for RemoteFrameDedup
impl Unpin for RemoteFrameDedup
impl UnsafeUnpin for RemoteFrameDedup
impl UnwindSafe for RemoteFrameDedup
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