pub enum DeclarationError {
Unparseable {
declared: String,
},
NoVersion,
}Expand description
Why a session could not be established.
Deliberately smaller than the engine’s own error: these are the cases where the protocol’s answer is “I cannot”, and the engine adds its own state errors around them. The distinction matters because only one of the two is something a peer can fix by asking for something different.
Variants§
Unparseable
The peer named a version this side cannot parse.
Fields
NoVersion
A message declared no version, and there is no session to fall back to.
The distinction from a missing header on a stateful session is the whole point of the stateless lifecycle: with nothing established, there is nothing to assume from, so an absent version is an error rather than a default. Answering with a guess here is how a stateless server ends up serving a modern peer a 2024 profile.
Trait Implementations§
Source§impl Clone for DeclarationError
impl Clone for DeclarationError
Source§impl Debug for DeclarationError
impl Debug for DeclarationError
Source§impl Display for DeclarationError
impl Display for DeclarationError
impl Eq for DeclarationError
Source§impl Error for DeclarationError
impl Error for DeclarationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()