proxmox/proxmox
Wolfgang Bumiller ab06665649 schema: introduce Updatable and Updater traits
The `Updatable` trait is our mechanism for "updating"
values. The `Updater` trait is a serde-helper to allow using
`skip_serializing_if` on api type structs which
`#[derive(Updater)]`

All basic types implement `Updatable<Updater = Option<T>>`,
and all `Option<T>` where `T: Updatable` are implicitly also
updatable from `Option<T>`.

With the update to the `#[api]` macro, all `#[api]` types
will implicitly `#[derive(Updatable)]` via the default
implementation (which simply assignes from an
`Option<Self>`), unless they explicitly also
`#[derive(Updater)]` in which case an implementation is
derived which goes through each "field" found in the
updater. To prevent fields from being updatable via an
Updater `#[updater(fixed)]` can be used.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-03 10:54:18 +01:00
..
debian bump proxmox to 0.10.1-1 2021-02-03 08:31:40 +01:00
examples fix u2f example 2021-01-13 11:29:33 +01:00
src schema: introduce Updatable and Updater traits 2021-02-03 10:54:18 +01:00
Cargo.toml bump proxmox to 0.10.1-1 2021-02-03 08:31:40 +01:00
u2f-api.js add proxmox::tools::tfa 2020-10-29 15:01:26 +01:00