pub struct Viewer(/* private fields */);Expand description
One watched broadcast’s standing claim on Viewers, held for as long as it is watched.
Holding it requests PROBE. Dropping it releases the claim and lowers the PROBE target.
Implementations§
Source§impl Viewer
impl Viewer
Sourcepub fn rate(&self) -> Option<Rate>
pub fn rate(&self) -> Option<Rate>
This viewer’s slice of the receive estimate right now.
None while the connection has no receive estimate, telling a player to hold its
current selection.
Sourcepub fn consume(&self) -> Consumer
pub fn consume(&self) -> Consumer
A handle reading this viewer’s current slice of the receive estimate.
Cloneable and independent of the viewer: once the viewer is dropped these report
None. Consumer::probed reports whether the peer is asked to probe for it.
Sourcepub fn update(&self, max: Rate) -> Result<()>
pub fn update(&self, max: Rate) -> Result<()>
Change the ceiling, keeping the same claim, as when a catalog enables or disables a rendition.
§Errors
Error::BoundsExceeded, keeping the previous ceiling, when the ceilings would
sum above Viewers::MAX_TARGET.
Auto Trait Implementations§
impl Freeze for Viewer
impl RefUnwindSafe for Viewer
impl Send for Viewer
impl Sync for Viewer
impl Unpin for Viewer
impl UnsafeUnpin for Viewer
impl UnwindSafe for Viewer
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