pub trait AsChangeset {
    type Target: QuerySource;
    type Changeset;
    fn as_changeset(self) -> Self::Changeset;
}
Expand description

Types which can be passed to update.set.

Deriving

This trait can be automatically derived using by adding #[derive(AsChangeset)] to your struct. Structs which derive this trait must be annotated with #[table_name = "something"]. If the field name of your struct differs from the name of the column, you can annotate the field with #[column_name = "some_column_name"].

By default, any Option fields on the struct are skipped if their value is None. If you would like to assign NULL to the field instead, you can annotate your struct with #[changeset_options(treat_none_as_null = "true")].

Associated Types

The table which Self::Changeset will be updating

The update statement this type represents

Required methods

Convert self into the actual update statement being executed

Implementations on Foreign Types

Implementors