pub struct LocalDescription { /* private fields */ }Expand description
What sipx will put in its own description, and the agent that will drive it.
Held by the caller across offer/answer: it is built when the port is bound and the offer is written, and it is consumed when the session starts. The agent inside it has already been told what was gathered, so the only thing still missing is the peer’s half.
Implementations§
Source§impl LocalDescription
impl LocalDescription
Sourcepub const fn credentials(&self) -> &Credentials
pub const fn credentials(&self) -> &Credentials
Our credentials, for a=ice-ufrag and a=ice-pwd.
Sourcepub fn candidates(&self) -> &[Candidate]
pub fn candidates(&self) -> &[Candidate]
The gathered candidates, priced, in descending priority.
Sourcepub fn default_destination(&self, component: ComponentId) -> Option<SocketAddr>
pub fn default_destination(&self, component: ComponentId) -> Option<SocketAddr>
Where the peer should send this component if it turns out not to do ICE — the c=/m=
default destination (RFC 8839 §4.2.1; spec §13.2).
“The candidate sipx would use if the peer turned out not to do ICE”, which for a full agent is the highest-priority one for the component.
Sourcepub fn attributes(&self) -> Vec<Attribute>
pub fn attributes(&self) -> Vec<Attribute>
The media-level attributes for the offer or the answer (RFC 8839 §4.2.1, §4.2.2).
a=ice-options:ice2 goes out on both: spec §8 makes aggressive nomination unavailable
rather than optional, and ice2 is how a peer is told that no pair will be re-nominated
mid-session.
Sourcepub fn accept(&mut self, negotiation: &Negotiation) -> bool
pub fn accept(&mut self, negotiation: &Negotiation) -> bool
Feed the agent the peer’s half of the exchange.
Returns whether ICE will actually be driven for this stream. false for
Negotiation::Absent and Negotiation::Mismatch alike — RFC 8839 §5.3 says ICE MUST
NOT be used for a mismatched stream, so the two differ in what the answer says and not in
what the media port does.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocalDescription
impl RefUnwindSafe for LocalDescription
impl Send for LocalDescription
impl Sync for LocalDescription
impl Unpin for LocalDescription
impl UnsafeUnpin for LocalDescription
impl UnwindSafe for LocalDescription
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
§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