Re-exports§
pub use config::DatabaseConfig;
pub use reqres::BodyContents;
pub use reqres::HttpMethod;
pub use reqres::RequestParameters;
pub use reqres::Response;
pub use reqres::ResponseStatusCode;
pub use reqres::RouteError;
pub use server::Server;
pub use urlencoded::FromUrlEncoded;
pub use urlencoded::UrlEncoded;
pub use chrono;
pub use tokio;
pub use tokio_postgres;
pub use uuid;
pub use database::*;
pub use json::*;
pub use query::*;
pub use route_module::*;
pub use routes::*;
Modules§
Macros§
- embed
- Embed a file into the binary as a string. This is useful for HTML files or other static files that need to be represented as a string.
- embed_
binary - Embed a file into the binary as a byte array. This is useful for binary files that need to be represented as a byte array.
- expect
- Convenience macro used when fetching a single record from the database.
- expect_
obj - Similar to
expect
, but formats the error message with the supplied object name for a friendlier response. - expression
- A macro for creating an expression.
- foreign
- A macro for creating a foreign field.
- foreign_
as - A macro for creating a foreign field with an alias.
- local
- A macro for creating a local field.
- local_
as - A macro for creating a local field with an alias.
Structs§
Traits§
- ToSql
- A trait for types that can be converted into Postgres values.
Derive Macros§
- From
Json - Derive [
tusk_rs::FromJson
] for a struct. - From
Postgres - Derive the [
tusk_rs::FromPostgres
] trait for a struct. - Json
Retrieve - Derive [
tusk_rs::JsonRetrieve
] for an enum. Each variant name is expected to match its string representation in JSON. - Postgres
Joins - Derive a default implementation of [
tusk_rs::PostgresJoins
] which returns no joins. - Postgres
Read Fields - Derive [
tusk_rs::PostgresReadFields
] by reading all struct fields. - Postgres
Readable - Blanket derive for [
tusk_rs::PostgresReadable
]. - Postgres
Write Fields - Derive [
tusk_rs::PostgresWriteFields
] by using all struct fields. - Postgres
Writeable - Derive [
tusk_rs::PostgresWriteable
] for a struct so it can be inserted or updated. - ToJson
- Derive a ToJson implementation.