pub struct Response { /* private fields */ }Implementations§
Source§impl Response
impl Response
pub fn new(status: StatusCode, body: ResponseBody, mime: MimeType) -> Response
pub fn error(status: StatusCode, body: ResponseBody) -> Response
pub fn set_mime(&mut self, mime: MimeType)
pub fn to_send_buffer(&self) -> Vec<u8> ⓘ
pub fn add_header(&mut self, value: impl IntoHeader)
pub fn version(&self) -> Version
pub fn status(&self) -> StatusCode
pub fn mime(&self) -> MimeType
Trait Implementations§
Source§impl From<Infallible> for Response
impl From<Infallible> for Response
Source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<StatusCode> for Response
impl From<StatusCode> for Response
Source§fn from(value: StatusCode) -> Self
fn from(value: StatusCode) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations§
Source§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
Source§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
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