Skip to main content

GccInterceptorBuilder

Struct GccInterceptorBuilder 

Source
pub struct GccInterceptorBuilder<P> { /* private fields */ }
Expand description

Builder for GccInterceptor.

Create with GccInterceptorBuilder::new, which returns (builder, handle).

Implementations§

Source§

impl<P> GccInterceptorBuilder<P>

Source

pub fn new() -> (Self, GccHandle)

Create a new builder and the associated GccHandle.

The handle can be shared with the application so it can read the latest bitrate estimate each polling tick.

Source

pub fn with_min_bitrate(self, bps: u32) -> Self

Minimum send rate floor (default 30 kbps).

Source

pub fn with_max_bitrate(self, bps: u32) -> Self

Maximum send rate ceiling (default 2.5 Mbps).

Source

pub fn with_received_rate_bound( self, received_rate_bound: ReceivedRateBound, ) -> Self

What the bound of the estimate by the received rate does to an estimate above it (Gcc::with_received_rate_bound): by default it only stops the increase, so the estimate is kept while the application sends less than it.

Source

pub fn build(self) -> impl FnOnce(P) -> GccInterceptor<P>

Build the interceptor factory closure.

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