pub struct PerfectNegotiation { /* private fields */ }Expand description
The perfect negotiation state of one side (see the module documentation).
Implementations§
Source§impl PerfectNegotiation
impl PerfectNegotiation
Sourcepub fn new(polite: bool) -> Self
pub fn new(polite: bool) -> Self
One side: polite rolls back its own offer when offers cross; the other side must be
impolite (one of each, decided by the application: the callee polite, say).
Sourcepub fn collisions(&self) -> u64
pub fn collisions(&self) -> u64
How many colliding offers arrived so far (rolled back for, or ignored).
Sourcepub fn on_negotiation_needed(
&mut self,
pc: &mut RTCPeerConnection,
now: Instant,
) -> Result<Option<RTCSessionDescription>>
pub fn on_negotiation_needed( &mut self, pc: &mut RTCPeerConnection, now: Instant, ) -> Result<Option<RTCSessionDescription>>
The connection needs negotiation (OnNegotiationNeededEvent): in the stable state an
offer is created and set as the local description; send it (the local description,
with the candidates gathered so far) to the peer, before any candidate gathered after. None while a
negotiation is under way (the connection says so again once it is back in stable).
§Errors
The offer could not be created or set.
Sourcepub fn on_remote_description(
&mut self,
pc: &mut RTCPeerConnection,
now: Instant,
description: RTCSessionDescription,
) -> Result<Option<RTCSessionDescription>>
pub fn on_remote_description( &mut self, pc: &mut RTCPeerConnection, now: Instant, description: RTCSessionDescription, ) -> Result<Option<RTCSessionDescription>>
A description from the peer. An offer that collides with this side’s own is ignored
by the impolite side (Ok(None)), and taken by the polite side after rolling its own
back (W3C webrtc-pc section 4.4.1.5: rollback). An offer taken is answered: send the
answer returned. An answer is applied; nothing to send.
§Errors
The description could not be applied, or the answer created.
Sourcepub fn on_remote_candidate(
&mut self,
pc: &mut RTCPeerConnection,
candidate: RTCIceCandidateInit,
) -> Result<()>
pub fn on_remote_candidate( &mut self, pc: &mut RTCPeerConnection, candidate: RTCIceCandidateInit, ) -> Result<()>
A candidate from the peer, delivered after the description it follows. One that fails while this side ignores the peer’s offer belongs to that offer and is dropped, as the W3C example does.
§Errors
The connection refused the candidate otherwise (ErrNoRemoteDescription for one
delivered ahead of the peer’s description: the signalling reordered them).
Trait Implementations§
Source§impl Clone for PerfectNegotiation
impl Clone for PerfectNegotiation
impl Copy for PerfectNegotiation
Source§impl Debug for PerfectNegotiation
impl Debug for PerfectNegotiation
impl Eq for PerfectNegotiation
Source§impl PartialEq for PerfectNegotiation
impl PartialEq for PerfectNegotiation
impl StructuralPartialEq for PerfectNegotiation
Auto Trait Implementations§
impl Forget for PerfectNegotiation
impl Freeze for PerfectNegotiation
impl Move for PerfectNegotiation
impl RefUnwindSafe for PerfectNegotiation
impl Send for PerfectNegotiation
impl Sync for PerfectNegotiation
impl Unpin for PerfectNegotiation
impl UnsafeUnpin for PerfectNegotiation
impl UnwindSafe for PerfectNegotiation
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.