pub struct Formatter<'a, 'b>(_)
where
'b: 'a;
Expand description
A formatter used to serialize headers to an output stream.
Implementations
sourceimpl<'a, 'b> Formatter<'a, 'b>
impl<'a, 'b> Formatter<'a, 'b>
sourcepub fn fmt_line(&mut self, line: &dyn Display) -> Result<(), Error>
pub fn fmt_line(&mut self, line: &dyn Display) -> Result<(), Error>
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> !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>where
'b: 'a,
impl<'a, 'b> !UnwindSafe for Formatter<'a, 'b>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more