pub struct Headers { /* private fields */ }Expand description
headers represents multiple http headers.
Implementations§
Source§impl Headers
impl Headers
pub fn builder() -> HeadersBuilder
pub fn read(buf: &mut BytesMut, max_size: usize) -> Result<Option<Self>>
pub fn read_ext( buf: &mut BytesMut, max_size: usize, lowercase: bool, ) -> Result<Option<Self>>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get_content_length(&self) -> Result<Option<usize>>
pub fn nth(&self, i: usize) -> Option<(&[u8], &[u8])>
pub fn iter(&self) -> Iter<'_>
pub fn get_bytes(&self, key: &str) -> Option<&[u8]>
pub fn get_by_field(&self, h: HttpField) -> Option<&[u8]>
pub fn get(&self, key: &str) -> Option<Cow<'_, str>>
pub fn position(&self, key: &str) -> Option<usize>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Headers
impl RefUnwindSafe for Headers
impl Send for Headers
impl Sync for Headers
impl Unpin for Headers
impl UnsafeUnpin for Headers
impl UnwindSafe for Headers
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
impl<T> CloneAnySend for T
impl<T> CloneAnySendSync for T
impl<T> CloneAnySync for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more