Skip to main content

FlexFecDecoderConfig

Struct FlexFecDecoderConfig 

Source
pub struct FlexFecDecoderConfig {
    pub repair_window: Duration,
    pub max_source_packets: usize,
    pub max_repair_packets: usize,
}
Expand description

Bounds on what a FlexFecDecoder keeps, all of them derived from the repair window the session agreed to (RFC 8627 sections 1.1.2 and 9).

Fields§

§repair_window: Duration

How long a source or repair packet is kept after it arrived: the repair-window parameter. A repair packet and the sources it protects are at most this far apart.

§max_source_packets: usize

The most source packets kept per source stream, whatever the window. Also the largest span of sequence numbers a repair packet may cover: one whose L and D (or mask) reach further cannot be within the repair window and is ignored (section 4.2.2.2).

§max_repair_packets: usize

The most repair packets kept while they wait for sources. The source packets they name are bounded too, at 16 times max_source_packets over all of them: the oldest repair packets go first.

Implementations§

Source§

impl FlexFecDecoderConfig

Source

pub const ASSUMED_PACKET_RATE: u32 = 1000

Packets per second the packet-count bounds assume when turning the repair window into a buffer size.

Source

pub const MIN_SOURCE_PACKETS: usize = 128

The floor and the ceiling of max_source_packets as derived from a repair window: a short window still holds one full mask, and no window makes a peer’s parameters allocate without bound (section 9).

Source

pub const MAX_SOURCE_PACKETS: usize = 4096

Source

pub fn for_repair_window(repair_window: Duration) -> Self

The bounds for a session whose repair window is repair_window.

Source

pub fn for_parameters(parameters: &FlexFecParameters) -> Self

The bounds for a session described by parameters (its a=fmtp line).

Trait Implementations§

Source§

impl Clone for FlexFecDecoderConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FlexFecDecoderConfig

Source§

impl Debug for FlexFecDecoderConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FlexFecDecoderConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for FlexFecDecoderConfig

Source§

impl PartialEq for FlexFecDecoderConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FlexFecDecoderConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.