pub struct StreamConfig {
pub pps: u32,
pub chunk_points: Option<usize>,
pub target_queue_points: usize,
pub underrun: UnderrunPolicy,
}Expand description
Configuration for starting a stream.
Fields§
§pps: u32Points per second output rate.
chunk_points: Option<usize>Exact chunk size to request/write. If None, the library chooses a default.
target_queue_points: usizeTarget amount of queued data expressed in points.
underrun: UnderrunPolicyWhat to do when the producer can’t keep up.
Implementations§
Source§impl StreamConfig
impl StreamConfig
Sourcepub fn with_chunk_points(self, chunk_points: usize) -> Self
pub fn with_chunk_points(self, chunk_points: usize) -> Self
Set the chunk size (builder pattern).
Sourcepub fn with_target_queue_points(self, points: usize) -> Self
pub fn with_target_queue_points(self, points: usize) -> Self
Set the target queue depth in points (builder pattern).
Sourcepub fn with_underrun(self, policy: UnderrunPolicy) -> Self
pub fn with_underrun(self, policy: UnderrunPolicy) -> Self
Set the underrun policy (builder pattern).
Trait Implementations§
Source§impl Clone for StreamConfig
impl Clone for StreamConfig
Source§fn clone(&self) -> StreamConfig
fn clone(&self) -> StreamConfig
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 moreSource§impl Debug for StreamConfig
impl Debug for StreamConfig
Auto Trait Implementations§
impl Freeze for StreamConfig
impl RefUnwindSafe for StreamConfig
impl Send for StreamConfig
impl Sync for StreamConfig
impl Unpin for StreamConfig
impl UnwindSafe for StreamConfig
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