Expand description
Procedural macros used by the tusk-rs library.
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.
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.