pub struct Field {
pub name: Cow<'static, [u8]>,
pub value: Cow<'static, [u8]>,
}Expand description
One decoded field line.
Bytes rather than the super::message types, because a pseudo-header is
neither a field name nor a field value: :method is not a token, and
RFC 9114 §4.3’s rule that the pseudo-headers come first can only be checked
while the two kinds are still one sequence. Sorting them out is
super::stream’s job, and it is the same pass that validates them.
Cow rather than Vec so that a static-table hit – which is what every
pseudo-header of a CONNECT request is – costs a pointer instead of a copy.
Fields§
§name: Cow<'static, [u8]>The field name, always lowercase on the wire (RFC 9114 §4.2).
value: Cow<'static, [u8]>The field value.
Trait Implementations§
impl Eq for Field
impl StructuralPartialEq for Field
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnsafeUnpin for Field
impl UnwindSafe for Field
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