pub enum BinaryParseError {
Parse(ParseError),
InvalidUtf8(Utf8Error),
}
Expand description
An error in parsing a text PROXY protocol header that is represented as a byte slice.
Variants§
Parse(ParseError)
An error in parsing a binary PROXY protocol header.
InvalidUtf8(Utf8Error)
Header is not valid UTF-8.
Trait Implementations§
Source§impl Clone for BinaryParseError
impl Clone for BinaryParseError
Source§fn clone(&self) -> BinaryParseError
fn clone(&self) -> BinaryParseError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BinaryParseError
impl Debug for BinaryParseError
Source§impl Display for BinaryParseError
impl Display for BinaryParseError
Source§impl Error for BinaryParseError
impl Error for BinaryParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ParseError> for BinaryParseError
impl From<ParseError> for BinaryParseError
Source§fn from(error: ParseError) -> Self
fn from(error: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<Utf8Error> for BinaryParseError
impl From<Utf8Error> for BinaryParseError
Source§impl PartialEq for BinaryParseError
impl PartialEq for BinaryParseError
Source§impl PartialResult for BinaryParseError
impl PartialResult for BinaryParseError
Source§fn 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.Source§fn 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.impl Eq for BinaryParseError
impl StructuralPartialEq for BinaryParseError
Auto Trait Implementations§
impl Freeze for BinaryParseError
impl RefUnwindSafe for BinaryParseError
impl Send for BinaryParseError
impl Sync for BinaryParseError
impl Unpin for BinaryParseError
impl UnwindSafe for BinaryParseError
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Error> ErrorExt for Error
impl<Error> ErrorExt for Error
Source§fn context<M>(self, context: M) -> OpaqueError
fn context<M>(self, context: M) -> OpaqueError
Wrap the error in a context. Read more
Source§fn with_context<C, F>(self, context: F) -> OpaqueError
fn with_context<C, F>(self, context: F) -> OpaqueError
Lazily wrap the error with a context. Read more
Source§fn into_opaque(self) -> OpaqueError
fn into_opaque(self) -> OpaqueError
Convert the error into an
OpaqueError
. Read more