pub struct Media(/* private fields */);Expand description
A crate::Media builder.
Implementations§
Source§impl Media
impl Media
pub fn new( media: MediaType, port: u16, proto: TransportProto, fmt: impl ToString, ) -> Self
pub fn num_ports(self, num_ports: u16) -> Self
pub fn num_ports_if(self, num_ports: u16, predicate: bool) -> Self
pub fn num_ports_if_some(self, num_ports: Option<u16>) -> Self
pub fn media_title(self, media_title: impl ToString) -> Self
pub fn media_title_if(self, media_title: impl ToString, predicate: bool) -> Self
pub fn media_title_if_some(self, media_title: Option<impl ToString>) -> Self
pub fn connection(self, connection: impl Into<Connection>) -> Self
pub fn connection_if( self, connection: impl Into<Connection>, predicate: bool, ) -> Self
pub fn connection_if_some( self, connection: Option<impl Into<Connection>>, ) -> Self
pub fn connections( self, connections: impl IntoIterator<Item = impl Into<Connection>>, ) -> Self
pub fn connections_if( self, connections: impl IntoIterator<Item = impl Into<Connection>>, predicate: bool, ) -> Self
pub fn bandwidth(self, bandwidth: Bandwidth) -> Self
pub fn bandwidth_if(self, bandwidth: Bandwidth, predicate: bool) -> Self
pub fn bandwidth_if_some(self, bandwidth: Option<Bandwidth>) -> Self
pub fn bandwidths(self, bandwidths: impl IntoIterator<Item = Bandwidth>) -> Self
pub fn bandwidths_if( self, bandwidths: impl IntoIterator<Item = Bandwidth>, predicate: bool, ) -> Self
pub fn encryption_key(self, key: impl Into<Key>) -> Self
pub fn encryption_key_if( self, encryption_key: impl Into<Key>, predicate: bool, ) -> Self
pub fn encryption_key_if_some( self, encryption_key: Option<impl Into<Key>>, ) -> Self
pub fn attribute(self, attribute: impl Into<Attribute>) -> Self
pub fn attribute_if( self, attribute: impl Into<Attribute>, predicate: bool, ) -> Self
pub fn attribute_if_some(self, attribute: Option<impl Into<Attribute>>) -> Self
pub fn attribute_from_str(self, attribute: impl ToString) -> Self
pub fn attribute_from_str_if( self, attribute: impl ToString, predicate: bool, ) -> Self
pub fn attribute_from_str_if_some( self, attribute: Option<impl ToString>, ) -> Self
pub fn attribute_with_value( self, attribute: impl ToString, value: impl ToString, ) -> Self
pub fn attribute_with_value_if( self, attribute: impl ToString, value: impl ToString, predicate: bool, ) -> Self
pub fn attribute_with_value_if_some( self, attribute: impl ToString, value: Option<impl ToString>, ) -> Self
pub fn attributes( self, attributes: impl IntoIterator<Item = impl Into<Attribute>>, ) -> Self
pub fn attributes_if( self, attributes: impl IntoIterator<Item = impl Into<Attribute>>, predicate: bool, ) -> Self
pub fn attributes_from_strs( self, attributes: impl IntoIterator<Item = impl ToString>, ) -> Self
pub fn attributes_from_strs_if( self, attributes: impl IntoIterator<Item = impl ToString>, predicate: bool, ) -> Self
pub fn attributes_from_strs_if_some( self, attributes: Option<impl IntoIterator<Item = impl ToString>>, ) -> Self
pub fn build(self) -> Media
Trait Implementations§
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> 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