pub enum ServerMessageParseError {
MismatchedCommand(Box<IRCMessage>),
MissingTag(Box<IRCMessage>, &'static str),
MissingTagValue(Box<IRCMessage>, &'static str),
MalformedTagValue(Box<IRCMessage>, &'static str, String),
MissingParameter(Box<IRCMessage>, usize),
MalformedChannel(Box<IRCMessage>),
MalformedParameter(Box<IRCMessage>, usize),
MissingPrefix(Box<IRCMessage>),
MissingNickname(Box<IRCMessage>),
}Expand description
Errors encountered while trying to parse an IRC message as a more specialized “server message”, based on its IRC command.
Variants§
MismatchedCommand(Box<IRCMessage>)
That command’s data is not parsed by this implementation
This type of error is only returned if you use try_from directly on a special
server message implementation, instead of the general ServerMessage::try_from
which covers all implementations and does not emit this type of error.
MissingTag(Box<IRCMessage>, &'static str)
No tag present under key key
MissingTagValue(Box<IRCMessage>, &'static str)
No tag value present under key key
MalformedTagValue(Box<IRCMessage>, &'static str, String)
Malformed tag value for tag key, value was value
MissingParameter(Box<IRCMessage>, usize)
No parameter found at index n
MalformedChannel(Box<IRCMessage>)
Malformed channel parameter (# must be present + something after it)
MalformedParameter(Box<IRCMessage>, usize)
Malformed parameter at index n
MissingPrefix(Box<IRCMessage>)
Missing prefix altogether
MissingNickname(Box<IRCMessage>)
No nickname found in prefix
Trait Implementations§
Source§impl Debug for ServerMessageParseError
impl Debug for ServerMessageParseError
Source§impl Display for ServerMessageParseError
impl Display for ServerMessageParseError
Source§impl Error for ServerMessageParseError
impl Error for ServerMessageParseError
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<ServerMessageParseError> for IRCMessage
impl From<ServerMessageParseError> for IRCMessage
Source§fn from(msg: ServerMessageParseError) -> IRCMessage
fn from(msg: ServerMessageParseError) -> IRCMessage
Source§impl PartialEq for ServerMessageParseError
impl PartialEq for ServerMessageParseError
impl Eq for ServerMessageParseError
impl StructuralPartialEq for ServerMessageParseError
Auto Trait Implementations§
impl Freeze for ServerMessageParseError
impl RefUnwindSafe for ServerMessageParseError
impl Send for ServerMessageParseError
impl Sync for ServerMessageParseError
impl Unpin for ServerMessageParseError
impl UnsafeUnpin for ServerMessageParseError
impl UnwindSafe for ServerMessageParseError
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> 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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.