pub struct InformationalResponse { /* private fields */ }Expand description
An informational status code and the associated header fields.
Implementations§
Source§impl InformationalResponse
impl InformationalResponse
pub fn new(status: StatusCode, fields: FieldSection) -> Self
pub fn status(&self) -> StatusCode
pub fn fields(&self) -> &FieldSection
Methods from Deref<Target = FieldSection>§
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Sourcepub fn get(&self, n: &[u8]) -> Option<&[u8]>
pub fn get(&self, n: &[u8]) -> Option<&[u8]>
Gets the value from the first instance of the field.
Sourcepub fn get_all<'a, 'b>(
&'a self,
n: &'b [u8],
) -> impl Iterator<Item = &'a [u8]> + 'bwhere
'a: 'b,
pub fn get_all<'a, 'b>(
&'a self,
n: &'b [u8],
) -> impl Iterator<Item = &'a [u8]> + 'bwhere
'a: 'b,
Gets all of the values of the named field.
pub fn put(&mut self, name: impl Into<Vec<u8>>, value: impl Into<Vec<u8>>)
pub fn iter(&self) -> impl Iterator<Item = &Field>
pub fn fields(&self) -> &[Field]
pub fn is_chunked(&self) -> bool
pub fn write_bhttp(&self, mode: Mode, w: &mut impl Write) -> Result<(), Error>
Trait Implementations§
Source§impl Deref for InformationalResponse
impl Deref for InformationalResponse
Auto Trait Implementations§
impl Freeze for InformationalResponse
impl RefUnwindSafe for InformationalResponse
impl Send for InformationalResponse
impl Sync for InformationalResponse
impl Unpin for InformationalResponse
impl UnwindSafe for InformationalResponse
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