pub struct BandwidthProducer { /* private fields */ }Expand description
Produces bandwidth estimates, notifying consumers when the value changes.
Implementations§
Source§impl BandwidthProducer
impl BandwidthProducer
pub fn new() -> Self
Sourcepub fn set(&self, bitrate: Option<u64>) -> Result<()>
pub fn set(&self, bitrate: Option<u64>) -> Result<()>
Set the current bandwidth estimate in bits per second.
Sourcepub fn consume(&self) -> BandwidthConsumer
pub fn consume(&self) -> BandwidthConsumer
Create a new consumer for the bandwidth estimate.
Trait Implementations§
Source§impl Clone for BandwidthProducer
impl Clone for BandwidthProducer
Source§fn clone(&self) -> BandwidthProducer
fn clone(&self) -> BandwidthProducer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BandwidthProducer
impl RefUnwindSafe for BandwidthProducer
impl Send for BandwidthProducer
impl Sync for BandwidthProducer
impl Unpin for BandwidthProducer
impl UnsafeUnpin for BandwidthProducer
impl UnwindSafe for BandwidthProducer
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