Struct nucleus_http::response::Response
source · 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.
source§impl PartialEq<Response> for Response
impl PartialEq<Response> for Response
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere T: 'a,
§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