pub struct ResyncConfig { /* private fields */ }Expand description
What a TsResync must be told by its caller: how many consecutive sync
bytes declare lock, which packet strides it may lock onto, and what it does
with bytes before the lock. There is no default: a capture reader and a
datagram framer want different values.
Implementations§
Source§impl ResyncConfig
impl ResyncConfig
Sourcepub const fn new(
confirmations: NonZeroUsize,
strides: &'static [PacketStride],
unlocked: Unlocked,
) -> Self
pub const fn new( confirmations: NonZeroUsize, strides: &'static [PacketStride], unlocked: Unlocked, ) -> Self
A configuration locking after confirmations sync bytes at one of
strides, tried in the given order. strides must not be empty.
Sourcepub const fn confirmations(&self) -> NonZeroUsize
pub const fn confirmations(&self) -> NonZeroUsize
Sync bytes required to declare lock.
Sourcepub const fn strides(&self) -> &'static [PacketStride]
pub const fn strides(&self) -> &'static [PacketStride]
The strides that may be locked onto, in preference order.
Trait Implementations§
Source§impl Clone for ResyncConfig
impl Clone for ResyncConfig
impl Copy for ResyncConfig
Source§impl Debug for ResyncConfig
impl Debug for ResyncConfig
impl Eq for ResyncConfig
Source§impl PartialEq for ResyncConfig
impl PartialEq for ResyncConfig
impl StructuralPartialEq for ResyncConfig
Auto Trait Implementations§
impl Forget for ResyncConfig
impl Freeze for ResyncConfig
impl Move for ResyncConfig
impl RefUnwindSafe for ResyncConfig
impl Send for ResyncConfig
impl Sync for ResyncConfig
impl Unpin for ResyncConfig
impl UnsafeUnpin for ResyncConfig
impl UnwindSafe for ResyncConfig
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