cb9d57b453
This way we can assign `API_SCHEMA` constants to `Option` types. Here's why: The api-macro generated code usese `T::API_SCHEMA` when building ObjectSchemas. For Updaters we replace `T` with `<T as Updatable>::Updater` This means for "simple" wrappers like our `Authid` or `Userid`, the ObjectSchema will try to refer to `<Authid as Updatable>::Updater::API_SCHEMA` which resolves to: `Option<Authid>::API_SCHEMA` which does not exist, for which we cannot add a normal `impl` block to add the schema variable, since `Option` is not "ours". But we now have a blanket implementation of `ApiType` for `Option<T> where T: ApiType` which just points to the original `T::API_SCHEMA`. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> |
||
---|---|---|
.. | ||
debian | ||
src | ||
tests | ||
Cargo.toml |