Struct rok::response::response::Response [−][src]
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]
Body: From<T>,
T: Send,
pub fn with_json<T>(val: &T) -> Self where
T: Serialize,
[src]
T: Serialize,
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]
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
HeaderValue: TryFrom<V>,
<HeaderValue as TryFrom<V>>::Error: Into<Error>,
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]
fn from(val: &'static [u8]) -> Self
[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]
Body: From<T>,
T: Send,
impl From<Json> for Response
[src]
impl From<Response<Body>> for Response
[src]
fn from(response: HyperResponse) -> Self
[src]
impl<E, R> From<Result<R, E>> for Response where
R: Into<Response>,
E: Error + 'static + Send + Sync,
[src]
R: Into<Response>,
E: Error + 'static + Send + Sync,
impl From<StatusCode> for Response
[src]
fn from(val: StatusCode) -> Self
[src]
impl From<String> for Response
[src]
impl From<Vec<u8, Global>> for Response
[src]
impl Into<Response<Body>> for Response
[src]
fn into(self) -> HyperResponse
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Response
[src]
impl Send for Response
[src]
impl Sync for Response
[src]
impl Unpin for Response
[src]
impl !UnwindSafe for Response
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,