pub struct CoalesceRing { /* private fields */ }Expand description
Ring of recently transmitted or answered frames, for coalescing resend requests: duplicate requests from multiple group members, and requests for a frame whose original transmission just left this node (a slow serialized link can deliver frames later than the requester’s patience).
Implementations§
Source§impl CoalesceRing
impl CoalesceRing
Sourcepub fn recently_answered(
&self,
conversation: &ConversationKey,
sequence: &MessageSequence,
now_ms: u64,
window_ms: u64,
) -> bool
pub fn recently_answered( &self, conversation: &ConversationKey, sequence: &MessageSequence, now_ms: u64, window_ms: u64, ) -> bool
True when an equivalent request was answered within window_ms.
pub fn record( &mut self, conversation: ConversationKey, sequence: &MessageSequence, now_ms: u64, )
Sourcepub fn record_frame(
&mut self,
conversation: ConversationKey,
message_id: u8,
fragment: Option<u8>,
now_ms: u64,
)
pub fn record_frame( &mut self, conversation: ConversationKey, message_id: u8, fragment: Option<u8>, now_ms: u64, )
Record one frame by its archive coordinates, refreshing any existing entry for the same frame.
Trait Implementations§
Source§impl Clone for CoalesceRing
impl Clone for CoalesceRing
Source§fn clone(&self) -> CoalesceRing
fn clone(&self) -> CoalesceRing
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CoalesceRing
impl Debug for CoalesceRing
Source§impl Default for CoalesceRing
impl Default for CoalesceRing
Source§fn default() -> CoalesceRing
fn default() -> CoalesceRing
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CoalesceRing
impl RefUnwindSafe for CoalesceRing
impl Send for CoalesceRing
impl Sync for CoalesceRing
impl Unpin for CoalesceRing
impl UnwindSafe for CoalesceRing
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)