pub struct JsonContent(pub String);Tuple Fields§
§0: StringTrait Implementations§
Source§impl Content for JsonContent
impl Content for JsonContent
Source§fn content_type(&self) -> &'static str
fn content_type(&self) -> &'static str
Implements content type.
Source§fn content_length(&self) -> usize
fn content_length(&self) -> usize
Implements content length.
Source§async fn write_content<W: Write>(self, writer: W) -> Result<(), W::Error>
async fn write_content<W: Write>(self, writer: W) -> Result<(), W::Error>
Write the content data.
Auto Trait Implementations§
impl Freeze for JsonContent
impl RefUnwindSafe for JsonContent
impl Send for JsonContent
impl Sync for JsonContent
impl Unpin for JsonContent
impl UnsafeUnpin for JsonContent
impl UnwindSafe for JsonContent
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<C> IntoResponse for Cwhere
C: Content,
impl<C> IntoResponse for Cwhere
C: Content,
§impl<T, State> IntoResponseWithState<State> for Twhere
T: IntoResponse,
impl<T, State> IntoResponseWithState<State> for Twhere
T: IntoResponse,
§async fn write_to_with_state<R, W>(
self,
_state: &State,
connection: Connection<'_, R>,
response_writer: W,
) -> Result<ResponseSent, <W as ResponseWriter>::Error>where
R: Read,
W: ResponseWriter<Error = <R as ErrorType>::Error>,
async fn write_to_with_state<R, W>(
self,
_state: &State,
connection: Connection<'_, R>,
response_writer: W,
) -> Result<ResponseSent, <W as ResponseWriter>::Error>where
R: Read,
W: ResponseWriter<Error = <R as ErrorType>::Error>,
Write the generated response into the given [
ResponseWriter].