pub struct Formatter<'a, 'b: 'a>(/* private fields */);
Expand description
A formatter used to serialize headers to an output stream.
Implementations§
Source§impl<'a, 'b> Formatter<'a, 'b>
impl<'a, 'b> Formatter<'a, 'b>
Sourcepub fn fmt_line(&mut self, line: &dyn Display) -> Result
pub fn fmt_line(&mut self, line: &dyn Display) -> Result
Format one ‘line’ of a header.
This writes the header name plus the Display
value as a single line.
§Note
This has the ability to format a header over multiple lines.
The main example here is Set-Cookie
, which requires that every
cookie being set be specified in a separate line. Almost every other
case should only format as 1 single line.
Auto Trait Implementations§
impl<'a, 'b> Freeze for Formatter<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for Formatter<'a, 'b>
impl<'a, 'b> !Send for Formatter<'a, 'b>
impl<'a, 'b> !Sync for Formatter<'a, 'b>
impl<'a, 'b> Unpin for Formatter<'a, 'b>
impl<'a, 'b> !UnwindSafe for Formatter<'a, 'b>
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