Skip to main content

Media

Struct Media 

Source
pub struct Media(/* private fields */);
Expand description

A crate::Media builder.

Implementations§

Source§

impl Media

Source

pub fn new( media: MediaType, port: u16, proto: TransportProto, fmt: impl ToString, ) -> Self

Source

pub fn num_ports(self, num_ports: u16) -> Self

Source

pub fn num_ports_if(self, num_ports: u16, predicate: bool) -> Self

Source

pub fn num_ports_if_some(self, num_ports: Option<u16>) -> Self

Source

pub fn media_title(self, media_title: impl ToString) -> Self

Source

pub fn media_title_if(self, media_title: impl ToString, predicate: bool) -> Self

Source

pub fn media_title_if_some(self, media_title: Option<impl ToString>) -> Self

Source

pub fn connection(self, connection: impl Into<Connection>) -> Self

Source

pub fn connection_if( self, connection: impl Into<Connection>, predicate: bool, ) -> Self

Source

pub fn connection_if_some( self, connection: Option<impl Into<Connection>>, ) -> Self

Source

pub fn connections( self, connections: impl IntoIterator<Item = impl Into<Connection>>, ) -> Self

Source

pub fn connections_if( self, connections: impl IntoIterator<Item = impl Into<Connection>>, predicate: bool, ) -> Self

Source

pub fn bandwidth(self, bandwidth: Bandwidth) -> Self

Source

pub fn bandwidth_if(self, bandwidth: Bandwidth, predicate: bool) -> Self

Source

pub fn bandwidth_if_some(self, bandwidth: Option<Bandwidth>) -> Self

Source

pub fn bandwidths(self, bandwidths: impl IntoIterator<Item = Bandwidth>) -> Self

Source

pub fn bandwidths_if( self, bandwidths: impl IntoIterator<Item = Bandwidth>, predicate: bool, ) -> Self

Source

pub fn encryption_key(self, key: impl Into<Key>) -> Self

Source

pub fn encryption_key_if( self, encryption_key: impl Into<Key>, predicate: bool, ) -> Self

Source

pub fn encryption_key_if_some( self, encryption_key: Option<impl Into<Key>>, ) -> Self

Source

pub fn attribute(self, attribute: impl Into<Attribute>) -> Self

Source

pub fn attribute_if( self, attribute: impl Into<Attribute>, predicate: bool, ) -> Self

Source

pub fn attribute_if_some(self, attribute: Option<impl Into<Attribute>>) -> Self

Source

pub fn attribute_from_str(self, attribute: impl ToString) -> Self

Source

pub fn attribute_from_str_if( self, attribute: impl ToString, predicate: bool, ) -> Self

Source

pub fn attribute_from_str_if_some( self, attribute: Option<impl ToString>, ) -> Self

Source

pub fn attribute_with_value( self, attribute: impl ToString, value: impl ToString, ) -> Self

Source

pub fn attribute_with_value_if( self, attribute: impl ToString, value: impl ToString, predicate: bool, ) -> Self

Source

pub fn attribute_with_value_if_some( self, attribute: impl ToString, value: Option<impl ToString>, ) -> Self

Source

pub fn attributes( self, attributes: impl IntoIterator<Item = impl Into<Attribute>>, ) -> Self

Source

pub fn attributes_if( self, attributes: impl IntoIterator<Item = impl Into<Attribute>>, predicate: bool, ) -> Self

Source

pub fn attributes_from_strs( self, attributes: impl IntoIterator<Item = impl ToString>, ) -> Self

Source

pub fn attributes_from_strs_if( self, attributes: impl IntoIterator<Item = impl ToString>, predicate: bool, ) -> Self

Source

pub fn attributes_from_strs_if_some( self, attributes: Option<impl IntoIterator<Item = impl ToString>>, ) -> Self

Source

pub fn build(self) -> Media

Trait Implementations§

Source§

impl Debug for Media

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Media

§

impl RefUnwindSafe for Media

§

impl Send for Media

§

impl Sync for Media

§

impl Unpin for Media

§

impl UnsafeUnpin for Media

§

impl UnwindSafe for Media

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.