pub struct ResponseHeaders { /* private fields */ }Expand description
Owned fixed-capacity response-header metadata.
Ordinary equality is intentionally unavailable because retained values may be sensitive.
ⓘ
use cloud_sdk::transport::ResponseHeaders;
let headers = ResponseHeaders::new();
let _ = headers == headers;Implementations§
Source§impl ResponseHeaders
impl ResponseHeaders
Sourcepub fn try_push(
&mut self,
name: &str,
value: &[u8],
sensitivity: HeaderSensitivity,
) -> Result<(), HeaderError>
pub fn try_push( &mut self, name: &str, value: &[u8], sensitivity: HeaderSensitivity, ) -> Result<(), HeaderError>
Appends one header atomically after validating every bound.
Sourcepub const fn encoded_len(&self) -> usize
pub const fn encoded_len(&self) -> usize
Returns the aggregate encoded field-line length.
Sourcepub fn iter(&self) -> impl Iterator<Item = ResponseHeader<'_>>
pub fn iter(&self) -> impl Iterator<Item = ResponseHeader<'_>>
Iterates in retained order.
Sourcepub fn get(&self, name: &str) -> Option<ResponseHeader<'_>>
pub fn get(&self, name: &str) -> Option<ResponseHeader<'_>>
Finds a retained header by ASCII case-insensitive name.
Trait Implementations§
Source§impl Clone for ResponseHeaders
impl Clone for ResponseHeaders
Source§fn clone(&self) -> ResponseHeaders
fn clone(&self) -> ResponseHeaders
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ResponseHeaders
Source§impl Debug for ResponseHeaders
impl Debug for ResponseHeaders
Auto Trait Implementations§
impl Freeze for ResponseHeaders
impl RefUnwindSafe for ResponseHeaders
impl Send for ResponseHeaders
impl Sync for ResponseHeaders
impl Unpin for ResponseHeaders
impl UnsafeUnpin for ResponseHeaders
impl UnwindSafe for ResponseHeaders
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