Struct s2n_quic_core::recovery::persistent_congestion::Calculator
source · pub struct Calculator { /* private fields */ }
Implementations§
source§impl Calculator
impl Calculator
sourcepub fn new(first_rtt_sample: Option<Timestamp>, path_id: Id) -> Self
pub fn new(first_rtt_sample: Option<Timestamp>, path_id: Id) -> Self
Create a new Calculator
for the given path_id
sourcepub fn persistent_congestion_duration(&self) -> Duration
pub fn persistent_congestion_duration(&self) -> Duration
Gets the longest persistent congestion period calculated
sourcepub fn on_lost_packet<PacketInfo>(
&mut self,
packet_number: PacketNumber,
packet_info: &SentPacketInfo<PacketInfo>
)
pub fn on_lost_packet<PacketInfo>( &mut self, packet_number: PacketNumber, packet_info: &SentPacketInfo<PacketInfo> )
Called for each packet detected as lost
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Calculator
impl RefUnwindSafe for Calculator
impl Send for Calculator
impl Sync for Calculator
impl Unpin for Calculator
impl UnwindSafe for Calculator
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