pub struct StructuralSchemaRewriter;Expand description
schemars Transform that rewrites a Schema to conform to Kubernetes’ “structural schema” rules
The following two transformations are applied
- Rewrite enums from
oneOftoobjects with multiple variants (schemars#84) - Rewrite untagged enums from
anyOftoobjects with multiple variants (kube#1028) - Merge untagged enums of plain enums from
anyOfinto a singleenum(kube#1622) - Rewrite
additionalPropertiesfrom#[serde(flatten)]tox-kubernetes-preserve-unknown-fields(kube#844)
This is used automatically by kube::derive’s #[derive(CustomResource)],
but it can also be used manually with SchemaSettings::with_transform.
§Panics
The Transform functions may panic if the transform could not be applied. For example,
there must not be any overlapping properties between oneOf branches.
Trait Implementations§
Source§impl Clone for StructuralSchemaRewriter
impl Clone for StructuralSchemaRewriter
Source§fn clone(&self) -> StructuralSchemaRewriter
fn clone(&self) -> StructuralSchemaRewriter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StructuralSchemaRewriter
impl Debug for StructuralSchemaRewriter
Auto Trait Implementations§
impl Freeze for StructuralSchemaRewriter
impl RefUnwindSafe for StructuralSchemaRewriter
impl Send for StructuralSchemaRewriter
impl Sync for StructuralSchemaRewriter
impl Unpin for StructuralSchemaRewriter
impl UnsafeUnpin for StructuralSchemaRewriter
impl UnwindSafe for StructuralSchemaRewriter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more