pub struct Ssrc {
pub ssrc_id: u32,
pub attribute: SsrcAttribute,
pub value: Option<String>,
}Expand description
SSRC media attribute.
Fields§
§ssrc_id: u32§attribute: SsrcAttribute§value: Option<String>Implementations§
Source§impl Ssrc
impl Ssrc
pub fn new(ssrc_id: u32, attribute: SsrcAttribute) -> Self
pub fn with_typed_attribute( ssrc_id: u32, attribute: impl TypedAttribute, ) -> Self
pub fn with_value( ssrc_id: u32, attribute: SsrcAttribute, value: impl ToString, ) -> Self
pub fn set_value(&mut self, value: impl ToString)
Sourcepub fn get_typed<T: TypedAttribute>(&self) -> Result<T, AttributeError>
pub fn get_typed<T: TypedAttribute>(&self) -> Result<T, AttributeError>
Gets the inner attribute as a TypedAttribute.
§Errors
AttributeError::Otherif the inner attribute doesn’t match the specifiedTypedAttributeor if the value is empty.- a specific
AttributeErrorif the typed attribute couldn’t be built.
Trait Implementations§
impl Eq for Ssrc
impl StructuralPartialEq for Ssrc
Auto Trait Implementations§
impl Freeze 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> 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