pub enum ProxyProtocolError<SvcErr = Infallible> {
Io(Error),
MissingHeader,
Parse(ParseError),
Service(SvcErr),
}Expand description
PROXY protocol acceptor or stream parsing error.
Variants§
Io(Error)
An I/O error occurred while reading the header prelude.
MissingHeader
The stream did not start with a PROXY protocol header.
Parse(ParseError)
The stream started with a PROXY protocol header, but it was invalid.
Service(SvcErr)
Wraps service errors.
Implementations§
Source§impl ProxyProtocolError<Infallible>
impl ProxyProtocolError<Infallible>
Sourcepub fn into_service_error<SvcErr>(self) -> ProxyProtocolError<SvcErr>
pub fn into_service_error<SvcErr>(self) -> ProxyProtocolError<SvcErr>
Casts the infallible service error type returned from acceptors into caller’s type.
Trait Implementations§
Source§impl<SvcErr: Debug> Debug for ProxyProtocolError<SvcErr>
impl<SvcErr: Debug> Debug for ProxyProtocolError<SvcErr>
Source§impl<SvcErr> Display for ProxyProtocolError<SvcErr>where
SvcErr: Display,
impl<SvcErr> Display for ProxyProtocolError<SvcErr>where
SvcErr: Display,
Source§impl<SvcErr> Error for ProxyProtocolError<SvcErr>where
SvcErr: Error + 'static,
impl<SvcErr> Error for ProxyProtocolError<SvcErr>where
SvcErr: Error + 'static,
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<SvcErr> From<Error> for ProxyProtocolError<SvcErr>
impl<SvcErr> From<Error> for ProxyProtocolError<SvcErr>
Source§impl<SvcErr> From<ParseError> for ProxyProtocolError<SvcErr>
impl<SvcErr> From<ParseError> for ProxyProtocolError<SvcErr>
Source§fn from(err: ParseError) -> Self
fn from(err: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<SvcErr = Infallible> !RefUnwindSafe for ProxyProtocolError<SvcErr>
impl<SvcErr = Infallible> !UnwindSafe for ProxyProtocolError<SvcErr>
impl<SvcErr> Freeze for ProxyProtocolError<SvcErr>where
SvcErr: Freeze,
impl<SvcErr> Send for ProxyProtocolError<SvcErr>where
SvcErr: Send,
impl<SvcErr> Sync for ProxyProtocolError<SvcErr>where
SvcErr: Sync,
impl<SvcErr> Unpin for ProxyProtocolError<SvcErr>where
SvcErr: Unpin,
impl<SvcErr> UnsafeUnpin for ProxyProtocolError<SvcErr>where
SvcErr: UnsafeUnpin,
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