pub struct WithHeaders<T> { /* private fields */ }Expand description
Adds response headers without changing the typed response body.
Implementations§
Source§impl<T> WithHeaders<T>
impl<T> WithHeaders<T>
pub fn header(self, name: impl Into<String>, value: impl Into<String>) -> Self
pub fn into_parts(self) -> (T, Vec<ResponseHeader>)
Trait Implementations§
Source§impl<T: Clone> Clone for WithHeaders<T>
impl<T: Clone> Clone for WithHeaders<T>
Source§fn clone(&self) -> WithHeaders<T>
fn clone(&self) -> WithHeaders<T>
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 moreSource§impl<T: Debug> Debug for WithHeaders<T>
impl<T: Debug> Debug for WithHeaders<T>
impl<T: Eq> Eq for WithHeaders<T>
Source§impl<T: PartialEq> PartialEq for WithHeaders<T>
impl<T: PartialEq> PartialEq for WithHeaders<T>
impl<T: PartialEq> StructuralPartialEq for WithHeaders<T>
Auto Trait Implementations§
impl<T> Freeze for WithHeaders<T>where
T: Freeze,
impl<T> RefUnwindSafe for WithHeaders<T>where
T: RefUnwindSafe,
impl<T> Send for WithHeaders<T>where
T: Send,
impl<T> Sync for WithHeaders<T>where
T: Sync,
impl<T> Unpin for WithHeaders<T>where
T: Unpin,
impl<T> UnsafeUnpin for WithHeaders<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for WithHeaders<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BackgroundExt for T
impl<T> BackgroundExt for T
fn background(self, task: BackgroundTask) -> Background<Self>
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