#[non_exhaustive]pub enum RegistrationObservation {
NotRegistered,
Absent,
Observed(SocketAddr),
Invalid(RegistrationObservationError),
}Expand description
What the registrar’s top response Via says it observed as this registration’s source.
This is an observation only. It is never copied into Contact, routing, GRUU, Outbound, push,
SDP or media policy. Self::Absent and Self::Invalid do not make an otherwise successful
registration fail, while Self::NotRegistered says there has not been a successful response
to inspect yet.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotRegistered
No REGISTER has completed successfully, so there is no response Via to report.
Absent
The top Via was valid and carried neither received nor rport.
Observed(SocketAddr)
The registrar reported one unambiguous IP address and port.
Invalid(RegistrationObservationError)
Observation fields were present but invalid, or the required top Via was unusable.
Implementations§
Source§impl RegistrationObservation
impl RegistrationObservation
Sourcepub const fn address(self) -> Option<SocketAddr>
pub const fn address(self) -> Option<SocketAddr>
The observed address, only when the registrar stated one unambiguously.
Sourcepub fn from_response(response: &Response) -> Self
pub fn from_response(response: &Response) -> Self
Interpret the top Via of one successful REGISTER response.
Trait Implementations§
Source§impl Clone for RegistrationObservation
impl Clone for RegistrationObservation
Source§fn clone(&self) -> RegistrationObservation
fn clone(&self) -> RegistrationObservation
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 RegistrationObservation
impl Debug for RegistrationObservation
Source§impl Default for RegistrationObservation
impl Default for RegistrationObservation
Source§fn default() -> RegistrationObservation
fn default() -> RegistrationObservation
Source§impl PartialEq for RegistrationObservation
impl PartialEq for RegistrationObservation
Source§fn eq(&self, other: &RegistrationObservation) -> bool
fn eq(&self, other: &RegistrationObservation) -> bool
self and other values to be equal, and is used by ==.impl Copy for RegistrationObservation
impl Eq for RegistrationObservation
impl StructuralPartialEq for RegistrationObservation
Auto Trait Implementations§
impl Freeze for RegistrationObservation
impl RefUnwindSafe for RegistrationObservation
impl Send for RegistrationObservation
impl Sync for RegistrationObservation
impl Unpin for RegistrationObservation
impl UnsafeUnpin for RegistrationObservation
impl UnwindSafe for RegistrationObservation
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