Spec

Trait Spec 

Source
pub trait Spec:
    Sized
    + Debug
    + Clone
    + Default
    + Serialize
    + DeserializeOwned
    + Send
    + Sync {
    type Status: Status;
    type Header: Header;

    const NAME_SPACED: bool = true;

    // Required method
    fn metadata() -> &'static Crd;

    // Provided methods
    fn label() -> &'static str { ... }
    fn api_version() -> String { ... }
    fn kind() -> String { ... }
    fn make_same(&mut self, _other: &Self) { ... }
}
Expand description

Kubernetes Spec

Provided Associated Constants§

Source

const NAME_SPACED: bool = true

if true, spec is namespaced

Required Associated Types§

Required Methods§

Source

fn metadata() -> &'static Crd

return uri for single instance

Provided Methods§

Source

fn label() -> &'static str

Source

fn api_version() -> String

Source

fn kind() -> String

Source

fn make_same(&mut self, _other: &Self)

in case of applying, we have some fields that are generated or override. So need to special logic to reset them so we can do proper comparison

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§