pub struct DecodedExtensions<'a> { /* private fields */ }Expand description
A wrapper around a slice of bytes representing the encoded extensions of the PROXY Protocol v2 header.
This implements IntoIterator to iterate over the extensions. See
DecodedExtensionsIter for more details.
Implementations§
Source§impl<'a> DecodedExtensions<'a>
impl<'a> DecodedExtensions<'a>
Sourcepub fn collect(self) -> Result<Vec<ExtensionRef<'a>>, DecodeError>
pub fn collect(self) -> Result<Vec<ExtensionRef<'a>>, DecodeError>
Iterates over the extensions of the PROXY Protocol v2 header and
collects them into a Vec<ExtensionRef>.
§Errors
See DecodeError.
Trait Implementations§
Source§impl<'a> AsRef<[u8]> for DecodedExtensions<'a>
impl<'a> AsRef<[u8]> for DecodedExtensions<'a>
Source§impl<'a> Debug for DecodedExtensions<'a>
impl<'a> Debug for DecodedExtensions<'a>
Source§impl<'a> IntoIterator for DecodedExtensions<'a>
impl<'a> IntoIterator for DecodedExtensions<'a>
Source§type IntoIter = DecodedExtensionsIter<'a>
type IntoIter = DecodedExtensionsIter<'a>
Which kind of iterator are we turning this into?
Source§type Item = Result<ExtensionRef<'a>, DecodeError>
type Item = Result<ExtensionRef<'a>, DecodeError>
The type of the elements being iterated over.
Auto Trait Implementations§
impl<'a> Freeze for DecodedExtensions<'a>
impl<'a> RefUnwindSafe for DecodedExtensions<'a>
impl<'a> Send for DecodedExtensions<'a>
impl<'a> Sync for DecodedExtensions<'a>
impl<'a> Unpin for DecodedExtensions<'a>
impl<'a> UnwindSafe for DecodedExtensions<'a>
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