Struct rok::response::response::Response[][src]

pub struct Response { /* fields omitted */ }

Implementations

impl Response[src]

pub fn new() -> Self[src]

pub fn with_status(status: StatusCode) -> Self[src]

pub fn with_html<T>(body: T) -> Self where
    Body: From<T>,
    T: Send
[src]

pub fn with_json<T>(val: &T) -> Self where
    T: Serialize
[src]

pub fn with_bytes(val: &'static [u8]) -> Self[src]

pub fn with_bytes_vec(val: Vec<u8>) -> Self[src]

pub fn with_str(s: &'static str) -> Self[src]

pub fn with_string(s: impl ToString) -> Self[src]

pub fn inner(&self) -> &HyperResponse[src]

pub fn inner_mut(&mut self) -> &mut HyperResponse[src]

pub fn status(&self) -> StatusCode[src]

pub fn headers(&self) -> &HeaderMap<HeaderValue>[src]

pub fn headers_mut(&mut self) -> &mut HeaderMap<HeaderValue>[src]

pub fn into_hyper_response(self) -> HyperResponse[src]

pub fn set_status(self, status: StatusCode) -> Self[src]

pub fn insert_header<K, V>(self, name: K, value: V) -> Self where
    HeaderName: TryFrom<K>,
    <HeaderName as TryFrom<K>>::Error: Into<Error>,
    HeaderValue: TryFrom<V>,
    <HeaderValue as TryFrom<V>>::Error: Into<Error>, 
[src]

pub async fn body_bytes(&mut self) -> Result<Vec<u8>, Error>[src]

Trait Implementations

impl Default for Response[src]

impl From<&'static [u8]> for Response[src]

impl From<&'static str> for Response[src]

impl From<Cow<'static, str>> for Response[src]

impl<T> From<Html<T>> for Response where
    Body: From<T>,
    T: Send
[src]

impl From<Json> for Response[src]

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

impl<E, R> From<Result<R, E>> for Response where
    R: Into<Response>,
    E: Error + 'static + Send + Sync
[src]

impl From<StatusCode> for Response[src]

impl From<String> for Response[src]

impl From<Vec<u8, Global>> for Response[src]

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

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,