pub struct WithContentType<T> { /* private fields */ }Expand description
Returned by with_content_type method.
Trait Implementations§
Source§impl<T> Debug for WithContentType<T>where
T: Debug,
impl<T> Debug for WithContentType<T>where
T: Debug,
Source§impl<T> IntoResponse for WithContentType<T>where
T: IntoResponse,
impl<T> IntoResponse for WithContentType<T>where
T: IntoResponse,
Source§fn into_response(self) -> Result<Response<Body>, Error>
fn into_response(self) -> Result<Response<Body>, Error>
Converts the implementing type into a
crate::Result<Response>. Read moreSource§fn with_header<K, V>(self, key: K, value: V) -> WithHeader<Self>
fn with_header<K, V>(self, key: K, value: V) -> WithHeader<Self>
Modifies the response by appending the specified header. Read more
Source§fn with_content_type<V>(self, content_type: V) -> WithContentType<Self>
fn with_content_type<V>(self, content_type: V) -> WithContentType<Self>
Modifies the response by setting the
Content-Type header. Read moreSource§fn with_status(self, status: StatusCode) -> WithStatus<Self>where
Self: Sized,
fn with_status(self, status: StatusCode) -> WithStatus<Self>where
Self: Sized,
Modifies the response by setting the status code. Read more
Source§fn with_body(self, body: impl Into<Body>) -> WithBody<Self>where
Self: Sized,
fn with_body(self, body: impl Into<Body>) -> WithBody<Self>where
Self: Sized,
Modifies the response by setting the body. Read more
Source§fn with_extension<T>(self, extension: T) -> WithExtension<Self, T>
fn with_extension<T>(self, extension: T) -> WithExtension<Self, T>
Modifies the response by inserting an extension. Read more
Auto Trait Implementations§
impl<T> !Freeze for WithContentType<T>
impl<T> Forget for WithContentType<T>
impl<T> RefUnwindSafe for WithContentType<T>where
T: RefUnwindSafe,
impl<T> Send for WithContentType<T>where
T: Send,
impl<T> Sync for WithContentType<T>where
T: Sync,
impl<T> Unpin for WithContentType<T>where
T: Unpin,
impl<T> UnsafeUnpin for WithContentType<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for WithContentType<T>where
T: UnwindSafe,
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoField<Auto<T>> for T
impl<T> IntoField<Auto<T>> for T
Source§fn into_field(self) -> Auto<T>
fn into_field(self) -> Auto<T>
Available on crate feature
db only.Converts the type to the field type.