Crate butane[−][src]
Modules
custom | For supporting additional types with the Pg backend (or other future backends). |
db | |
migrations | For working with migrations. If using the butane CLI tool, it is not necessary to use these types directly. |
prelude | Prelude module to improve ergonomics. |
query | Types to support database queries. Most users will use
the |
Macros
colname | Typesafe way to refer to a column name. Use as
|
filter | Macro to construct a |
find | Finds a specific database object. |
query | Constructs a filtered database query. |
Structs
ForeignKey | Used to implement a relationship between models. |
Many | Used to implement a many-to-many relationship between models. |
ObjectState | Used internally by butane to track state about the object. |
Enums
Error | Butane errors. |
SqlType | Enumeration of the types a database value may take. |
SqlVal | A database value. |
SqlValRef |
Traits
AsPrimaryKey | Trait for referencing the primary key for a given model. Used to implement ForeignKey equality tests. |
DataObject | An object in the database. |
DataResult | A type which may be the result of a database query. |
FieldType | Type suitable for being a database column. |
FromSql | Used to convert a |
ToSql | Used to convert another type to a |
Type Definitions
Result |
Attribute Macros
butane_type | Attribute macro which marks a type as being available to butane for use in models. |
dataresult | Attribute macro which generates an implementation of
|
model | Attribute macro which marks a struct as being a data model and
generates an implementation of |