pub struct DataTrackOptions { /* private fields */ }Expand description
Options for publishing a data track.
§Examples
Create options for publishing a track named “my_track”:
let options = DataTrackOptions::new("my_track");Implementations§
Source§impl DataTrackOptions
impl DataTrackOptions
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Creates options with the given track name.
The track name is used to identify the track to other participants.
§Requirements
- Must not be empty
- Must be unique per publisher
Sourcepub fn with_schema(self, schema: DataTrackSchemaId) -> Self
pub fn with_schema(self, schema: DataTrackSchemaId) -> Self
Sets the schema associated with frames sent on the track.
Sourcepub fn with_frame_encoding(self, encoding: DataTrackFrameEncoding) -> Self
pub fn with_frame_encoding(self, encoding: DataTrackFrameEncoding) -> Self
Sets the encoding of frames sent on the track.
Trait Implementations§
Source§impl Clone for DataTrackOptions
impl Clone for DataTrackOptions
Source§fn clone(&self) -> DataTrackOptions
fn clone(&self) -> DataTrackOptions
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 moreSource§impl Debug for DataTrackOptions
impl Debug for DataTrackOptions
Source§impl From<&str> for DataTrackOptions
impl From<&str> for DataTrackOptions
Auto Trait Implementations§
impl Freeze for DataTrackOptions
impl RefUnwindSafe for DataTrackOptions
impl Send for DataTrackOptions
impl Sync for DataTrackOptions
impl Unpin for DataTrackOptions
impl UnsafeUnpin for DataTrackOptions
impl UnwindSafe for DataTrackOptions
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