Expand description
This is a pretty straightforward TODO app using the Axum web framework. You can add TODOs to your list but only if they meet certain criteria.
To run it:
cargo runAdd a TODO (HTTP 202):
curl -w "%{http_code}" -XPOST -H "content-type: application/json" \
http://localhost:8080/todos -d '{"kind":"work","text":"Learn more Rust"}'Fetch the current TODOs:
curl http://localhost:8080/todosAdd another TODO (HTTP 400):
curl -w "%{http_code}" -XPOST -H "content-type: application/json" \
http://localhost:8080/todos -d '{"kind":"home","text":"Learn more Rust"}'Structsยง
- AppContext ๐
- Policy
Decider ๐ - Todo ๐
Enumsยง
- Todo
Kind ๐ - Todos
Error ๐
Constantsยง
- HOME_
TODO_ ๐POLICY - WORK_
TODO_ ๐POLICY
Functionsยง
- add_
todo ๐ - list_
todos ๐ - main ๐