Enum ppp::v1::ParseError
source · [−]pub enum ParseError {
Show 16 variants
InvalidPrefix,
Partial,
MissingPrefix,
MissingNewLine,
MissingProtocol,
MissingSourceAddress,
MissingDestinationAddress,
MissingSourcePort,
MissingDestinationPort,
HeaderTooLong,
InvalidProtocol,
InvalidSuffix,
InvalidSourceAddress(AddrParseError),
InvalidDestinationAddress(AddrParseError),
InvalidSourcePort(Option<ParseIntError>),
InvalidDestinationPort(Option<ParseIntError>),
}
Expand description
An error in parsing a text PROXY protocol header.
Variants
InvalidPrefix
Partial
MissingPrefix
MissingNewLine
MissingProtocol
MissingSourceAddress
MissingDestinationAddress
MissingSourcePort
MissingDestinationPort
HeaderTooLong
InvalidProtocol
InvalidSuffix
InvalidSourceAddress(AddrParseError)
InvalidDestinationAddress(AddrParseError)
InvalidSourcePort(Option<ParseIntError>)
InvalidDestinationPort(Option<ParseIntError>)
Trait Implementations
sourceimpl Debug for ParseError
impl Debug for ParseError
sourceimpl Display for ParseError
impl Display for ParseError
sourceimpl Error for ParseError
impl Error for ParseError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<ParseError> for BinaryParseError
impl From<ParseError> for BinaryParseError
sourcefn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<ParseError> for ParseError
impl PartialEq<ParseError> for ParseError
sourcefn eq(&self, other: &ParseError) -> bool
fn eq(&self, other: &ParseError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ParseError) -> bool
fn ne(&self, other: &ParseError) -> bool
This method tests for !=
.
sourceimpl<'a> PartialResult for ParseError
impl<'a> PartialResult for ParseError
sourcefn is_incomplete(&self) -> bool
fn is_incomplete(&self) -> bool
Tests whether this Result
is incomplete.
An action that leads to an incomplete result may have a different result with more bytes.
Retrying with the same input will not change the result. Read more
sourcefn is_complete(&self) -> bool
fn is_complete(&self) -> bool
Tests whether this Result
is successful or whether the error is terminal.
A terminal error will not result in a success even with more bytes.
Retrying with the same – or more – input will not change the result. Read more
impl StructuralPartialEq for ParseError
Auto Trait Implementations
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more