Crate tusk_rs

Source

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§

config
database
json
query
reqres
route_module
routes
server
urlencoded

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§

Row
A row of data returned from the database by a query.
SqlState
A SQLSTATE error code

Traits§

ToSql
A trait for types that can be converted into Postgres values.

Derive Macros§

FromJson
Derive [tusk_rs::FromJson] for a struct.
FromPostgres
Derive the [tusk_rs::FromPostgres] trait for a struct.
JsonRetrieve
Derive [tusk_rs::JsonRetrieve] for an enum. Each variant name is expected to match its string representation in JSON.
PostgresJoins
Derive a default implementation of [tusk_rs::PostgresJoins] which returns no joins.
PostgresReadFields
Derive [tusk_rs::PostgresReadFields] by reading all struct fields.
PostgresReadable
Blanket derive for [tusk_rs::PostgresReadable].
PostgresWriteFields
Derive [tusk_rs::PostgresWriteFields] by using all struct fields.
PostgresWriteable
Derive [tusk_rs::PostgresWriteable] for a struct so it can be inserted or updated.
ToJson
Derive a ToJson implementation.