Enum salvo::writer::Text [−][src]
pub enum Text<C> {
Plain(C),
Json(C),
Html(C),
Xml(C),
}
Expand description
Write text content to response as text content.
Variants
Plain(C)
It will set content-type
to text/plain; charset=utf-8
.
Json(C)
It will set content-type
to application/json; charset=utf-8
.
Html(C)
It will set content-type
to text/html; charset=utf-8
.
Xml(C)
It will set content-type
to application/xml; 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,
Text<C>: '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,
Text<C>: 'async_trait,
Write data to Respone
.
Auto Trait Implementations
impl<C> RefUnwindSafe for Text<C> where
C: RefUnwindSafe,
impl<C> UnwindSafe for Text<C> where
C: 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