You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use actix_web::{get,App,HttpServer,ResultasAwResult};use maud::{html,Markup};use std::io;#[get("/")]asyncfnindex() -> AwResult<Markup>{Ok(html!{
html {
body {
h1 {"Hello World!"}}}})}#[actix_web::main]asyncfnmain() -> io::Result<()>{HttpServer::new(|| App::new().service(index)).bind(("127.0.0.1",8080))?
.run().await}
The error spilled out as follows.
error[E0277]: the trait bound `PreEscaped<String>: Responder` is not satisfied
--> src/main.rs:5:1
|
5 |#[get("/")]| ^^^^^^^^^^^ the trait `Responder` is not implemented for`PreEscaped<String>`
What can I do for next?
The text was updated successfully, but these errors were encountered:
What's the contents of your Cargo.toml and Cargo.lock? This usually happens when the actix-web version is not compatible. Or the feature is not enabled.
In this page of Actix , I copied the codes.
https://maud.lambda.xyz/web-frameworks.html
The error spilled out as follows.
What can I do for next?
The text was updated successfully, but these errors were encountered: