diff --git a/docs/docs/controllers/cookies.md b/docs/docs/controllers/cookies.md index 92f0d308..f9f0523b 100644 --- a/docs/docs/controllers/cookies.md +++ b/docs/docs/controllers/cookies.md @@ -73,4 +73,4 @@ Reading private cookies works much like regular cookies, except instead of using let session_id = cookies.get_private("session_id")?; ``` -Decryption will be done automatically, and the controller will be able to accees the plain text value of the cookie. +Decryption will be done automatically, and the controller will be able to access the plain text value of the cookie. diff --git a/docs/docs/controllers/index.md b/docs/docs/controllers/index.md index 8dbbc792..61cf8013 100644 --- a/docs/docs/controllers/index.md +++ b/docs/docs/controllers/index.md @@ -46,7 +46,7 @@ impl Controller for CurrentTime { } ``` -The `Controller` trait is asynchronous. Support for async traits in Rust is still incomplete, so we use the [`async_trait`](https://docs.rs/async_trait) library to make it easy to use. The trait itself has a few methods, most of which have reasonable defaults. The only methodthat needs to be written by hand is `async fn handle()`. +The `Controller` trait is asynchronous. Support for async traits in Rust is still incomplete, so we use the [`async_trait`](https://docs.rs/async_trait) library to make it easy to use. The trait itself has a few methods, most of which have reasonable defaults. The only method that needs to be written by hand is `async fn handle()`. #### `handle` diff --git a/rwf/src/prelude.rs b/rwf/src/prelude.rs index c87eab8c..e05f3071 100644 --- a/rwf/src/prelude.rs +++ b/rwf/src/prelude.rs @@ -4,14 +4,14 @@ pub use crate::controller::{auth::SessionAuth, AuthHandler}; pub use crate::controller::{ Authentication, Controller, Error, ModelController, PageController, RestController, SessionId, }; -pub use crate::http::{Message, Method, Request, Response}; +pub use crate::http::{Cookie, CookieBuilder, Message, Method, Request, Response}; pub use crate::job::Job; pub use crate::logging::Logger; pub use crate::model::{Migrations, Model, Pool, Scope, ToSql, ToValue}; pub use crate::view::{Template, ToTemplateValue, TurboStream, TurboStreams}; pub use async_trait::async_trait; -pub use time::OffsetDateTime; +pub use time::{Duration, OffsetDateTime}; pub use tokio; pub use macros::{crud, rest, route};