#[non_exhaustive]pub enum InvalidEventType {
Empty,
TooLong {
len: usize,
},
ControlCharacter,
BidirectionalControl,
}Expand description
An EventType failed validation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Empty
The event type was empty. The specification requires every event to carry a type.
TooLong
The event type exceeded MAX_EVENT_TYPE_LEN
bytes.
ControlCharacter
The event type contained a control character (Unicode Cc).
BidirectionalControl
The event type contained one of the nine explicit bidirectional formatting controls: U+202A–U+202E or U+2066–U+2069.
Separate from ControlCharacter for the reason
InvalidTag::BidirectionalControl gives.
Trait Implementations§
Source§impl Clone for InvalidEventType
impl Clone for InvalidEventType
Source§impl Debug for InvalidEventType
impl Debug for InvalidEventType
Source§impl Display for InvalidEventType
impl Display for InvalidEventType
impl Eq for InvalidEventType
Source§impl Error for InvalidEventType
impl Error for InvalidEventType
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()
Source§impl From<!> for InvalidEventType
impl From<!> for InvalidEventType
Source§fn from(never: Infallible) -> Self
fn from(never: Infallible) -> Self
Lets Event::new accept both &str, which
converts fallibly, and an already-built EventType,
whose conversion cannot fail.
The match has no arms because Infallible
has no values, and the compiler accepts an empty match on an uninhabited
type as exhaustive. That is what lets an infallible conversion satisfy a
fallible bound.