1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
mod crd;
pub mod metadata;
pub mod options;
pub use self::crd::Crd;
pub use self::crd::CrdNames;
pub use self::crd::GROUP;
pub use self::crd::V1;
pub trait Status: Sized{}
pub trait Spec: Sized {
type Status: Status;
fn metadata() -> &'static Crd;
fn api_version() -> String {
let metadata = Self::metadata();
if metadata.group == "core" {
return metadata.version.to_owned();
}
format!("{}/{}", metadata.group, metadata.version)
}
fn kind() -> String {
Self::metadata().names.kind.to_owned()
}
fn make_same(&mut self,_other: &Self) {
}
}