Crate stackable_versioned

Source
Expand description

This crate enables versioning of structs and enums through procedural macros.

It is part of the project DeLorean and converts between different CRD versions by using 1.21 GW of power, 142km/h and time travel.

Currently supported versioning schemes:

  • Kubernetes API versions (eg: v1alpha1, v1beta1, v1, v2), with optional support for generating CRDs.

Support will be extended to SemVer versions, as well as custom version formats in the future.

See versioned for an in-depth usage guide and a list of supported arguments.

  __---~~~~--__                      __--~~~~---__
 `\---~~~~~~~~\\                    //~~~~~~~~---/'
   \/~~~~~~~~~\||                  ||/~~~~~~~~~\/
               `\\                //'
                 `\\            //'
                   ||          ||
         ______--~~~~~~~~~~~~~~~~~~--______
    ___ // _-~                        ~-_ \\ ___
   `\__)\/~                              ~\/(__/'
    _--`-___                            ___-'--_
  /~     `\ ~~~~~~~~------------~~~~~~~~ /'     ~\
 /|        `\         ________         /'        |\
| `\   ______`\_      \------/      _/'______   /' |
|   `\_~-_____\ ~-________________-~ /_____-~_/'   |
`.     ~-__________________________________-~     .'
 `.      [_______/------|~~|------\_______]      .'
  `\--___((____)(________\/________)(____))___--/'
   |>>>>>>||</                        \>||<<<<<<|
   `\<<<<</'                            `\>>>>>/'

Credit: Tua Xiong in https://asciiart.website/art/4323

Structs§

ChangedValue
Contains a changed value for a single field of the CRD.
ChangedValues
Contains changed values during upgrades and downgrades of CRDs.
UnknownDesiredApiVersionError

Enums§

ConvertObjectError
This error indicates that converting an object from a conversion review to the desired version failed.
ParseObjectError
This error indicates that parsing an object from a conversion review failed.

Traits§

TrackingFrom
A value-to-value conversion that consumes the input value while tracking changes via a Kubernetes status.
TrackingInto
A value-to-value conversion that consumes the input value while tracking changes via a Kubernetes status. The opposite of TrackingFrom.
TrackingStatus
Used to access ChangedValues from any status.

Functions§

jthong_path

Attribute Macros§

versioned
This macro enables generating versioned structs and enums.