pub struct SendReport {
pub sent: usize,
pub payload_bytes: usize,
pub remaining_due: usize,
}Expand description
Accepted work and remaining eligible work from EventSender::send_due.
Queued packets stay pending until individually acknowledged, even after a
successful send. remaining_due excludes accepted packets waiting to retry.
use ferravex_net::reliable::EventSender;
let mut sender = EventSender::default();
sender.queue(b"event")?;
let report = sender.send_due(0, 1, 5, |_| true);
assert_eq!((report.sent, report.payload_bytes, report.remaining_due), (1, 5, 0));
assert_eq!(sender.pending(), 1); // Acceptance is not a remote ACK.Fields§
§sent: usizePackets whose callback returned true during this call.
payload_bytes: usizeSum of accepted payload lengths; excludes sequence and encoded overhead.
remaining_due: usizePackets still eligible at the supplied time, including a refused or
over-budget packet and the untouched due tail. At most EVENT_LIMIT.
Trait Implementations§
Source§impl Clone for SendReport
impl Clone for SendReport
Source§fn clone(&self) -> SendReport
fn clone(&self) -> SendReport
Returns a duplicate of the value. Read more
1.0.0 · 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 SendReport
impl Debug for SendReport
Source§impl Default for SendReport
impl Default for SendReport
Source§fn default() -> SendReport
fn default() -> SendReport
Returns the “default value” for a type. Read more
Source§impl PartialEq for SendReport
impl PartialEq for SendReport
impl Copy for SendReport
impl Eq for SendReport
impl StructuralPartialEq for SendReport
Auto Trait Implementations§
impl Freeze for SendReport
impl RefUnwindSafe for SendReport
impl Send for SendReport
impl Sync for SendReport
impl Unpin for SendReport
impl UnwindSafe for SendReport
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