pub enum Parsed {
Need(usize),
Header {
source: Option<SocketAddr>,
len: usize,
},
Invalid(&'static str),
}Expand description
What the bytes read so far say.
Variants§
Need(usize)
Read until the buffer holds this many bytes, then parse again.
Header
A complete header of len bytes. source is None for LOCAL /
UNKNOWN / unsupported address families: keep the peer address.
Invalid(&'static str)
Not a PROXY protocol header (or a broken one).
Trait Implementations§
impl Eq for Parsed
impl StructuralPartialEq for Parsed
Auto Trait Implementations§
impl Freeze for Parsed
impl RefUnwindSafe for Parsed
impl Send for Parsed
impl Sync for Parsed
impl Unpin for Parsed
impl UnsafeUnpin for Parsed
impl UnwindSafe for Parsed
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.