pub struct Field<'a> { /* private fields */ }Expand description
Entire HTTP field line, excluding any trailing CRLF.
field-line = field-name ":" OWS field-value OWSThe parsed field-value excludes surrounding optional whitespace.
Implementations§
Source§impl<'a> Field<'a>
impl<'a> Field<'a>
Sourcepub fn try_from_slice(input: &'a [u8]) -> Result<Self, ErrMode<ContextError>>
pub fn try_from_slice(input: &'a [u8]) -> Result<Self, ErrMode<ContextError>>
Parses an entire HTTP field line from bytes, excluding the trailing CRLF.
Sourcepub fn name_indices(&self) -> Range<usize>
pub fn name_indices(&self) -> Range<usize>
Returns the byte indices of the field name.
Sourcepub fn value_indices(&self) -> Range<usize>
pub fn value_indices(&self) -> Range<usize>
Returns the byte indices of the trimmed field value.
Sourcepub fn value(&self) -> FieldValue<'a>
pub fn value(&self) -> FieldValue<'a>
Returns the parsed field value.
Trait Implementations§
impl<'a> Eq for Field<'a>
impl<'a> StructuralPartialEq for Field<'a>
Auto Trait Implementations§
impl<'a> Freeze for Field<'a>
impl<'a> RefUnwindSafe for Field<'a>
impl<'a> Send for Field<'a>
impl<'a> Sync for Field<'a>
impl<'a> Unpin for Field<'a>
impl<'a> UnsafeUnpin for Field<'a>
impl<'a> UnwindSafe for Field<'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