Skip to main content

Ssrc

Struct Ssrc 

Source
pub struct Ssrc {
    pub id: u32,
    pub attribute: String,
    pub value: Option<String>,
}
Expand description

a=ssrc:<ssrc-id> <attribute>[:<value>] (RFC 5576 section 4.1): one source attribute of one synchronization source.

A source with several attributes has several lines. The source attributes RFC 5576 defines are cname (section 6.1), previous-ssrc (section 6.2) and fmtp (section 6.3); WebRTC endpoints also write msid (draft-ietf-mmusic-msid, before RFC 8830 moved it to the media level) and the unregistered mslabel and label. Any other attribute name is kept: Ssrc::attribute and Ssrc::value always hold what the line said.

Fields§

§id: u32

The synchronization source.

§attribute: String

The source attribute’s name, a token.

§value: Option<String>

The source attribute’s value: what follows the name’s colon.

Implementations§

Source§

impl Ssrc

Source

pub fn cname(&self) -> Option<&str>

cname:<cname> (RFC 5576 section 6.1): the source’s RTCP canonical name.

Source

pub fn previous_ssrcs(&self) -> Option<Result<Vec<u32>>>

previous-ssrc:<ssrc-id> *(SP <ssrc-id>) (RFC 5576 section 6.2): the SSRCs this source used before. None when this line is another attribute.

Source

pub fn fmtp(&self) -> Option<Result<Fmtp>>

fmtp:<format> <format specific parameters> (RFC 5576 section 6.3): format parameters that apply to this source only.

Source

pub fn msid(&self) -> Option<Result<Msid>>

msid:<id> [<appdata>]: the MediaStream and track of this source, as endpoints wrote it before RFC 8830.

Trait Implementations§

Source§

impl Clone for Ssrc

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Ssrc

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Ssrc

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Ssrc

Source§

impl PartialEq for Ssrc

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Ssrc

Source§

impl TypedAttribute for Ssrc

Source§

const NAME: &'static str = "ssrc"

The attribute name, as it follows a=.
Source§

fn parse(value: &str) -> Result<Self>

Parses the value: everything after a=<name>:.
Source§

fn to_attribute(&self) -> Attribute

The a= line this value makes.

Auto Trait Implementations§

§

impl Forget for Ssrc

§

impl Freeze for Ssrc

§

impl Move for Ssrc

§

impl RefUnwindSafe for Ssrc

§

impl Send for Ssrc

§

impl Sync for Ssrc

§

impl Unpin for Ssrc

§

impl UnsafeUnpin for Ssrc

§

impl UnwindSafe for Ssrc

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.