pub struct MediaAddress { /* private fields */ }Expand description
The two address roles of one media socket.
advertised is written into SDP and may be a public NAT mapping the host does not own.
bind selects the local interface on which the RTP socket is opened. Passing an IpAddr
keeps the historical behaviour by using it for both roles.
When ICE is enabled, these addresses are only the local gathering base and initial SDP default. A nominated ICE pair owns the live destination; symmetric RTP cannot replace it.
Implementations§
Source§impl MediaAddress
impl MediaAddress
Sourcepub const fn with_bind(self, bind: IpAddr) -> Self
pub const fn with_bind(self, bind: IpAddr) -> Self
Bind RTP on bind while continuing to advertise the address passed to Self::new.
An unspecified bind address is valid. The advertised address must be reachable by the peer; an unspecified one is refused before signalling. With ICE enabled, the nominated pair takes precedence over symmetric-RTP source learning.
Sourcepub const fn advertised(self) -> IpAddr
pub const fn advertised(self) -> IpAddr
The address serialized into SDP.
Trait Implementations§
Source§impl Clone for MediaAddress
impl Clone for MediaAddress
Source§fn clone(&self) -> MediaAddress
fn clone(&self) -> MediaAddress
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MediaAddress
impl Debug for MediaAddress
Source§impl From<IpAddr> for MediaAddress
impl From<IpAddr> for MediaAddress
Source§impl PartialEq for MediaAddress
impl PartialEq for MediaAddress
Source§fn eq(&self, other: &MediaAddress) -> bool
fn eq(&self, other: &MediaAddress) -> bool
self and other values to be equal, and is used by ==.impl Copy for MediaAddress
impl Eq for MediaAddress
impl StructuralPartialEq for MediaAddress
Auto Trait Implementations§
impl Freeze for MediaAddress
impl RefUnwindSafe for MediaAddress
impl Send for MediaAddress
impl Sync for MediaAddress
impl Unpin for MediaAddress
impl UnsafeUnpin for MediaAddress
impl UnwindSafe for MediaAddress
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more