pub struct VideoRate { /* private fields */ }Implementations§
Source§impl VideoRate
impl VideoRate
pub fn camera(cap: usize) -> VideoRate
pub fn screen(cap: usize) -> VideoRate
pub fn new( ladder: &'static [Rung], camera: bool, start: usize, cap: usize, ) -> VideoRate
pub fn rung(&self) -> Rung
pub fn rungs(&self) -> usize
Sourcepub fn set_pin(&mut self, pin: Option<usize>) -> Option<Rung>
pub fn set_pin(&mut self, pin: Option<usize>) -> Option<Rung>
Hold a rung, or let the ladder run again. A held rung may sit above the path’s cap: the cap is a default for the ladder, the pin is the user’s word. Returns the rung when it moved.
pub fn set_fps(&mut self, fps: Option<u32>) -> Rung
pub fn is_camera(&self) -> bool
Sourcepub fn set_cap(&mut self, cap: usize) -> Option<Rung>
pub fn set_cap(&mut self, cap: usize) -> Option<Rung>
A new ceiling (the path changed, or the peer said how much it can take). Returns the rung when the ceiling pushed it down. The round-trip floor starts over too: a new path has its own.
Sourcepub fn observe(&mut self, obs: VideoObservation) -> Option<Rung>
pub fn observe(&mut self, obs: VideoObservation) -> Option<Rung>
Once a second. Returns the rung to switch to when it changed.
Auto Trait Implementations§
impl Freeze for VideoRate
impl RefUnwindSafe for VideoRate
impl Send for VideoRate
impl Sync for VideoRate
impl Unpin for VideoRate
impl UnsafeUnpin for VideoRate
impl UnwindSafe for VideoRate
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more