pub struct FetchHttpHeaders { /* private fields */ }Expand description
Redacted subset of response headers consumed by the body decoder.
Implementations§
Source§impl FetchHttpHeaders
impl FetchHttpHeaders
Sourcepub fn new(
content_type: Option<String>,
content_encoding: Option<String>,
content_length: Option<u64>,
) -> Result<Self, FetchProviderError>
pub fn new( content_type: Option<String>, content_encoding: Option<String>, content_length: Option<u64>, ) -> Result<Self, FetchProviderError>
Creates bounded response metadata for a body decoder or fixture.
§Errors
Rejects oversized, control-containing header values.
Sourcepub fn content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
Returns the bounded Content-Type value.
Sourcepub fn content_encoding(&self) -> Option<&str>
pub fn content_encoding(&self) -> Option<&str>
Returns the bounded Content-Encoding value.
Sourcepub const fn content_length(&self) -> Option<u64>
pub const fn content_length(&self) -> Option<u64>
Returns the parsed Content-Length value.
Trait Implementations§
Source§impl Clone for FetchHttpHeaders
impl Clone for FetchHttpHeaders
Source§impl Debug for FetchHttpHeaders
impl Debug for FetchHttpHeaders
impl Eq for FetchHttpHeaders
Source§impl PartialEq for FetchHttpHeaders
impl PartialEq for FetchHttpHeaders
impl StructuralPartialEq for FetchHttpHeaders
Auto Trait Implementations§
impl Freeze for FetchHttpHeaders
impl RefUnwindSafe for FetchHttpHeaders
impl Send for FetchHttpHeaders
impl Sync for FetchHttpHeaders
impl Unpin for FetchHttpHeaders
impl UnsafeUnpin for FetchHttpHeaders
impl UnwindSafe for FetchHttpHeaders
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.