Trait hyper_simple_server::ResponseExtBuild[][src]

pub trait ResponseExtBuild<B> where
    B: BodyTrait,
    Self: Sized
{ fn new_with_status_and_body(
        _status: StatusCode,
        _content_type: Option<impl Into<HeaderValue>>,
        _body: impl Into<B>
    ) -> Self; fn new_empty() -> Self
    where
        B: Default
, { ... }
fn new_200_with_body(
        _content_type: Option<impl Into<HeaderValue>>,
        _body: impl Into<B>
    ) -> Self { ... }
fn new_200_with_text(_body: impl Into<B>) -> Self { ... }
fn new_200_with_html(_body: impl Into<B>) -> Self { ... }
fn new_200() -> Self
    where
        B: From<&'static str>
, { ... }
fn new_404() -> Self
    where
        B: From<&'static str>
, { ... }
fn new_method_not_allowed() -> Self
    where
        B: From<&'static str>
, { ... }
fn ok<E>(self) -> Result<Self, E> { ... }
fn ok_0(self) -> Result<Self, ServerError> { ... }
fn ready<E>(self) -> Ready<Result<Self, E>> { ... }
fn ready_0(self) -> Ready<Result<Self, ServerError>> { ... } }

Required methods

fn new_with_status_and_body(
    _status: StatusCode,
    _content_type: Option<impl Into<HeaderValue>>,
    _body: impl Into<B>
) -> Self
[src]

Loading content...

Provided methods

fn new_empty() -> Self where
    B: Default
[src]

fn new_200_with_body(
    _content_type: Option<impl Into<HeaderValue>>,
    _body: impl Into<B>
) -> Self
[src]

fn new_200_with_text(_body: impl Into<B>) -> Self[src]

fn new_200_with_html(_body: impl Into<B>) -> Self[src]

fn new_200() -> Self where
    B: From<&'static str>, 
[src]

fn new_404() -> Self where
    B: From<&'static str>, 
[src]

fn new_method_not_allowed() -> Self where
    B: From<&'static str>, 
[src]

fn ok<E>(self) -> Result<Self, E>[src]

fn ok_0(self) -> Result<Self, ServerError>[src]

fn ready<E>(self) -> Ready<Result<Self, E>>[src]

fn ready_0(self) -> Ready<Result<Self, ServerError>>[src]

Loading content...

Implementors

impl ResponseExtBuild<Body> for Response<Body>[src]

Loading content...