proxmox/proxmox-schema/src
Wolfgang Bumiller 2e2edcf833 schema: add Schema::unwrap_*_schema_cloned
This way we can copy and modify a schema.

Eg. via the following ways:

    const FOO_SCHEMA: Schema = SOME_SCHEMA
        .unwrap_integer_schema_cloned()
        .description("Foo")
        .schema();

Note that for example there is currently no builder to set a
`default_key` for an `ObjectSchema` back to None, so one could do:

    const FOO_SCHEMA: Schema = const {
        let mut schema = SOME_SCHEMA.unwrap_object_schema_cloned();
        schema.default_key = None;
        schema.schema()
    };

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-01-15 11:56:57 +01:00
..
de schema: support PVE's "keyAlias" legacy property strings 2025-01-15 10:56:58 +01:00
ser schema: serialize enum unit variants 2023-09-07 17:29:36 +02:00
api_type_macros.rs add proxmox-schema and proxmox-router crates 2021-10-11 11:39:59 +02:00
api_types.rs schema: api-types: add ip/cidr api schemas 2024-05-16 09:09:37 +02:00
const_regex.rs schema: remove lazy_static dependency 2024-08-14 10:33:42 +02:00
format.rs schema: property description: output indentation where its required 2024-10-22 14:51:19 +02:00
lib.rs schema: remove lazy_static dependency 2024-08-14 10:33:42 +02:00
property_string.rs schema: support PVE's "keyAlias" legacy property strings 2025-01-15 10:56:58 +01:00
schema.rs schema: add Schema::unwrap_*_schema_cloned 2025-01-15 11:56:57 +01:00
upid.rs elide lifetimes where possible 2024-12-03 13:44:05 +01:00