Struct warp::reply::WithHeader
source · pub struct WithHeader<T> {
header: Option<(HeaderName, HeaderValue)>,
reply: T,
}
Expand description
Wraps an impl Reply
and adds a header when rendering.
Returned by warp::reply::with_header
.
Fields§
§header: Option<(HeaderName, HeaderValue)>
§reply: T
Trait Implementations§
source§impl<T: Debug> Debug for WithHeader<T>
impl<T: Debug> Debug for WithHeader<T>
source§impl<T: Reply> Reply for WithHeader<T>
impl<T: Reply> Reply for WithHeader<T>
source§fn into_response(self) -> Response
fn into_response(self) -> Response
Converts the given value into a
Response
.Auto Trait Implementations§
impl<T> !Freeze for WithHeader<T>
impl<T> RefUnwindSafe for WithHeader<T>where
T: RefUnwindSafe,
impl<T> Send for WithHeader<T>where
T: Send,
impl<T> Sync for WithHeader<T>where
T: Sync,
impl<T> Unpin for WithHeader<T>where
T: Unpin,
impl<T> UnwindSafe for WithHeader<T>where
T: UnwindSafe,
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