Skip to main content

StreamScheduler

Enum StreamScheduler 

Source
#[non_exhaustive]
pub enum StreamScheduler { FirstComeFirstServed, RoundRobin, RoundRobinPerPacket, Priority, FairCapacity, WeightedFairQueueing, }
Expand description

How an association picks the stream whose data it sends next: the stream schedulers of RFC 8260 section 3.

Without user message interleaving a message that is part sent is finished before another stream is served, so a scheduler chooses between messages. With interleaving (TransportConfig::with_message_interleaving, when the peer supports it too) it chooses for every chunk, and a large message no longer holds the others up.

A stream’s priority is set with Stream::set_priority.

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.
§

FirstComeFirstServed

Messages leave in the order they were written, whatever their stream (RFC 8260 section 3.1).

§

RoundRobin

The streams with something to send take turns: a message each, or a chunk each when interleaving (section 3.2).

§

RoundRobinPerPacket

Round robin that changes stream only when a new packet is started, so a packet carries the data of one stream and its loss holds up that stream alone (section 3.3).

§

Priority

The stream with the highest priority goes first, as long as it has something to send; streams of equal priority take turns (section 3.4).

§

FairCapacity

Each stream gets the same share of the bytes sent (section 3.5).

§

WeightedFairQueueing

Each stream gets a share of the bytes sent in proportion to its priority, taken as its weight (section 3.6, which RFC 8831 section 6.4 asks of WebRTC).

Trait Implementations§

Source§

impl Clone for StreamScheduler

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 StreamScheduler

Source§

impl Debug for StreamScheduler

Source§

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

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

impl Default for StreamScheduler

Source§

fn default() -> Self

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

impl Eq for StreamScheduler

Source§

impl PartialEq for StreamScheduler

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 StreamScheduler

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.