pub struct DataTrackSubscribeOptions { /* private fields */ }Expand description
Options for subscribing to a data track.
§Examples
Specify a custom buffer size:
let options = DataTrackSubscribeOptions::default()
.with_buffer_size(128); // Buffer 128 frames internally
Implementations§
Source§impl DataTrackSubscribeOptions
impl DataTrackSubscribeOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates subscribe options with default values.
Equivalent to Self::default.
Sourcepub fn buffer_size(&self) -> usize
pub fn buffer_size(&self) -> usize
Returns the maximum number of received frames buffered internally.
Sourcepub fn with_buffer_size(self, frames: usize) -> Self
pub fn with_buffer_size(self, frames: usize) -> Self
Sets the maximum number of received frames buffered internally.
Zero is not a valid buffer size; if a value of zero is provided, it will be clamped to one.
Note: if there is already an active subscription for a given track, specifying a different buffer size when obtaining a new subscription will have no effect.
Trait Implementations§
Source§impl Clone for DataTrackSubscribeOptions
impl Clone for DataTrackSubscribeOptions
Source§fn clone(&self) -> DataTrackSubscribeOptions
fn clone(&self) -> DataTrackSubscribeOptions
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 DataTrackSubscribeOptions
impl Debug for DataTrackSubscribeOptions
Auto Trait Implementations§
impl Freeze for DataTrackSubscribeOptions
impl RefUnwindSafe for DataTrackSubscribeOptions
impl Send for DataTrackSubscribeOptions
impl Sync for DataTrackSubscribeOptions
impl Unpin for DataTrackSubscribeOptions
impl UnsafeUnpin for DataTrackSubscribeOptions
impl UnwindSafe for DataTrackSubscribeOptions
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