pub struct NackGeneratorBuilder<P> { /* private fields */ }Expand description
Implementations§
Source§impl<P> NackGeneratorBuilder<P>
impl<P> NackGeneratorBuilder<P>
Sourcepub fn with_size(self, size: u16) -> Self
pub fn with_size(self, size: u16) -> Self
Set the size of the receive log.
Size must be a power of 2 between 64 and 32768 (inclusive).
Sourcepub fn with_interval(self, interval: Duration) -> Self
pub fn with_interval(self, interval: Duration) -> Self
Set the interval between NACK generation cycles.
Sourcepub fn with_skip_last_n(self, skip_last_n: u16) -> Self
pub fn with_skip_last_n(self, skip_last_n: u16) -> Self
Set the number of most recent packets to skip when generating NACKs.
This helps avoid generating NACKs for packets that are simply delayed and haven’t arrived yet.
Sourcepub fn with_max_nacks_per_packet(self, max: u16) -> Self
pub fn with_max_nacks_per_packet(self, max: u16) -> Self
Set the maximum number of NACKs to send per missing packet.
Set to 0 (default) for unlimited NACKs.
Sourcepub fn build(self) -> impl FnOnce(P) -> NackGeneratorInterceptor<P>
pub fn build(self) -> impl FnOnce(P) -> NackGeneratorInterceptor<P>
Build the interceptor factory function.
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for NackGeneratorBuilder<P>
impl<P> RefUnwindSafe for NackGeneratorBuilder<P>where
P: RefUnwindSafe,
impl<P> Send for NackGeneratorBuilder<P>where
P: Send,
impl<P> Sync for NackGeneratorBuilder<P>where
P: Sync,
impl<P> Unpin for NackGeneratorBuilder<P>where
P: Unpin,
impl<P> UnwindSafe for NackGeneratorBuilder<P>where
P: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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