[−][src]Function portal::reply::html
pub fn html<T>(body: T) -> impl Reply where
Body: From<T>,
T: Send,
Reply with a body and content-type
set to text/html; charset=utf-8
.
Example
use portal::Filter; let body = r#" <html> <head> <title>HTML with portal!</title> </head> <body> <h1>portal + HTML = :heart:</h1> </body> </html> "#; let route = portal::any() .map(|| { portal::reply::html(body) });