#[non_exhaustive]pub struct ErrorResponse {
pub code: ErrorCode,
pub reason: String,
pub alternate_server: Option<SocketAddr>,
pub try_alternate: Option<TryAlternate>,
pub unknown_attributes: Vec<AttrType>,
}Expand description
An error response from the server: its code and what a client acts on with it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: ErrorCodeThe STUN error code, for example 437 (stun::error_code::CODE_ALLOC_MISMATCH).
reason: StringThe reason phrase the server sent. For people; nothing depends on its text.
alternate_server: Option<SocketAddr>The ALTERNATE-SERVER of a 300 (Try Alternate): the server to use instead
(RFC 8489 §10, RFC 8656 §7.4). It is reported whether or not the response was
authenticated; see try_alternate.
try_alternate: Option<TryAlternate>The redirection of a 300 (Try Alternate) that was authenticated with the request’s
credential: every ALTERNATE-SERVER and the ALTERNATE-DOMAIN. RFC 8489 §14.8 has a
client validate the response before it redirects itself, so this is None for a 300
that was not signed, such as one to the first Allocate, which carries no credential.
Client::follow_alternate takes it.
unknown_attributes: Vec<AttrType>The attributes a 420 (Unknown Attribute) says the server did not understand.