pub struct HostLatencyInfo { /* private fields */ }Expand description
Latency estimate for an opened host stream.
Implementations§
Source§impl HostLatencyInfo
impl HostLatencyInfo
Sourcepub fn new(input_frames: u32, output_frames: u32) -> Self
pub fn new(input_frames: u32, output_frames: u32) -> Self
Builds a latency estimate from input and output frame counts.
§Examples
use sim_lib_stream_host::HostLatencyInfo;
let latency = HostLatencyInfo::new(64, 128);
assert_eq!(latency.input_frames(), 64);
assert_eq!(latency.output_frames(), 128);Sourcepub fn input_frames(self) -> u32
pub fn input_frames(self) -> u32
Returns the estimated input latency in frames.
Sourcepub fn output_frames(self) -> u32
pub fn output_frames(self) -> u32
Returns the estimated output latency in frames.
Trait Implementations§
Source§impl Clone for HostLatencyInfo
impl Clone for HostLatencyInfo
Source§fn clone(&self) -> HostLatencyInfo
fn clone(&self) -> HostLatencyInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HostLatencyInfo
Source§impl Debug for HostLatencyInfo
impl Debug for HostLatencyInfo
Source§impl Default for HostLatencyInfo
impl Default for HostLatencyInfo
Source§fn default() -> HostLatencyInfo
fn default() -> HostLatencyInfo
Returns the “default value” for a type. Read more
impl Eq for HostLatencyInfo
Source§impl PartialEq for HostLatencyInfo
impl PartialEq for HostLatencyInfo
Source§fn eq(&self, other: &HostLatencyInfo) -> bool
fn eq(&self, other: &HostLatencyInfo) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HostLatencyInfo
Auto Trait Implementations§
impl Freeze for HostLatencyInfo
impl RefUnwindSafe for HostLatencyInfo
impl Send for HostLatencyInfo
impl Sync for HostLatencyInfo
impl Unpin for HostLatencyInfo
impl UnsafeUnpin for HostLatencyInfo
impl UnwindSafe for HostLatencyInfo
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