#[non_exhaustive]pub enum Stuffing {
DropNulls,
PadTo {
packets_per_input: f64,
},
}Expand description
Configuration for TsFixBuilder::stuffing.
#[non_exhaustive] — future modes may be added without a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DropNulls
Drop all null packets (PID 0x1FFF) from the output.
Constructed via Stuffing::drop_nulls.
PadTo
Insert null packets to reach a target packet rate.
Constructed via Stuffing::pad_to.
Implementations§
Source§impl Stuffing
impl Stuffing
Sourcepub fn drop_nulls() -> Self
pub fn drop_nulls() -> Self
Drop all null packets from the output.
§Example
use ts_fix::Stuffing;
let cfg = Stuffing::drop_nulls();Sourcepub fn pad_to(packets_per_input: f64) -> Self
pub fn pad_to(packets_per_input: f64) -> Self
Pad the stream to a target packet rate.
Inserts null packets (PID 0x1FFF) after each input packet such that the
total output is approximately packets_per_input × number_of_input_packets.
The rate is accumulated across the stream; fractional rates are smoothed.
§Example — double the packet count
use ts_fix::Stuffing;
let cfg = Stuffing::pad_to(2.0);Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stuffing
impl RefUnwindSafe for Stuffing
impl Send for Stuffing
impl Sync for Stuffing
impl Unpin for Stuffing
impl UnsafeUnpin for Stuffing
impl UnwindSafe for Stuffing
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