Struct kern::http::server::ResponseData

source ·
pub struct ResponseData<'a> {
    pub status: &'a str,
    pub headers: HashMap<&'a str, &'a str>,
}
Expand description

Additional response data

Fields§

§status: &'a str§headers: HashMap<&'a str, &'a str>

Implementations§

source§

impl<'a> ResponseData<'a>

source

pub fn new() -> Self

Create new with default values

source

pub fn build(self) -> Option<Self>

Wraps in Option for respond

source

pub fn status(self, status: &'a str) -> Self

Change status

source

pub fn header(self, key: &'a str, value: &'a str) -> Self

Add header

source

pub fn continue100() -> Self

source

pub fn switching_protocols() -> Self

source

pub fn early_hints() -> Self

source

pub fn ok() -> Self

source

pub fn created() -> Self

source

pub fn accepted() -> Self

source

pub fn non_authoritative_information() -> Self

source

pub fn no_content() -> Self

source

pub fn reset_content() -> Self

source

pub fn partial_content() -> Self

source

pub fn multi_status() -> Self

source

pub fn already_reported() -> Self

source

pub fn im_used() -> Self

source

pub fn multiple_choices() -> Self

source

pub fn moved_permanently() -> Self

source

pub fn found() -> Self

source

pub fn see_other() -> Self

source

pub fn not_modified() -> Self

source

pub fn temporary_redirect() -> Self

source

pub fn permanent_redirect() -> Self

source

pub fn bad_request() -> Self

source

pub fn unauthorized() -> Self

source

pub fn payment_required() -> Self

source

pub fn forbidden() -> Self

source

pub fn not_found() -> Self

source

pub fn method_not_allowed() -> Self

source

pub fn not_acceptable() -> Self

source

pub fn proxy_authentication_required() -> Self

source

pub fn request_timeout() -> Self

source

pub fn conflict() -> Self

source

pub fn gone() -> Self

source

pub fn length_required() -> Self

source

pub fn precondition_failed() -> Self

source

pub fn content_too_large() -> Self

source

pub fn uri_too_long() -> Self

source

pub fn unsupported_media_type() -> Self

source

pub fn range_not_satisfiable() -> Self

source

pub fn expectation_failed() -> Self

source

pub fn im_a_teapot() -> Self

source

pub fn misdirected_request() -> Self

source

pub fn unprocessable_content() -> Self

source

pub fn locked() -> Self

source

pub fn failed_dependency() -> Self

source

pub fn too_early() -> Self

source

pub fn upgrade_required() -> Self

source

pub fn precondition_required() -> Self

source

pub fn too_many_requests() -> Self

source

pub fn request_header_fields_too_large() -> Self

source

pub fn internal_server_error() -> Self

source

pub fn not_implemented() -> Self

source

pub fn bad_gateway() -> Self

source

pub fn service_unavailable() -> Self

source

pub fn gateway_timeout() -> Self

source

pub fn http_version_not_supported() -> Self

source

pub fn variant_also_negotiates() -> Self

source

pub fn insufficient_storage() -> Self

source

pub fn loop_detected() -> Self

source

pub fn not_extended() -> Self

source

pub fn network_authentication_required() -> Self

Trait Implementations§

source§

impl<'a> Clone for ResponseData<'a>

source§

fn clone(&self) -> ResponseData<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for ResponseData<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Default for ResponseData<'a>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for ResponseData<'a>

§

impl<'a> Send for ResponseData<'a>

§

impl<'a> Sync for ResponseData<'a>

§

impl<'a> Unpin for ResponseData<'a>

§

impl<'a> UnwindSafe for ResponseData<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.