Struct salvo::prelude::JsonText [−][src]
pub struct JsonText<T>(_);
Expand description
Write text content to response as json content. It will set content-type
to application/json; charset=utf-8
.
Trait Implementations
pub fn write<'life0, 'life1, 'life2, 'async_trait>(
self,
_req: &'life0 mut Request,
_depot: &'life1 mut Depot,
res: &'life2 mut Response
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
JsonText<T>: 'async_trait,
pub fn write<'life0, 'life1, 'life2, 'async_trait>(
self,
_req: &'life0 mut Request,
_depot: &'life1 mut Depot,
res: &'life2 mut Response
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
JsonText<T>: 'async_trait,
Write data to Respone
.
Auto Trait Implementations
impl<T> RefUnwindSafe for JsonText<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for JsonText<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more