pub trait Resource {
const API_VERSION: &'static str;
const GROUP: &'static str;
const KIND: &'static str;
const VERSION: &'static str;
const URL_PATH_SEGMENT: &'static str;
type Scope: ResourceScope;
}
pub trait ResourceScope {}
pub struct ClusterResourceScope {}
impl ResourceScope for ClusterResourceScope {}
pub struct NamespaceResourceScope {}
impl ResourceScope for NamespaceResourceScope {}
pub struct SubResourceScope {}
impl ResourceScope for SubResourceScope {}
pub trait ListableResource: Resource {
const LIST_KIND: &'static str;
}
pub trait Metadata: Resource {
type Ty;
fn metadata(&self) -> &<Self as Metadata>::Ty;
fn metadata_mut(&mut self) -> &mut<Self as Metadata>::Ty;
}
pub fn api_version<T>(_: &T) -> &'static str where T: Resource {
<T as Resource>::API_VERSION
}
pub fn group<T>(_: &T) -> &'static str where T: Resource {
<T as Resource>::GROUP
}
pub fn kind<T>(_: &T) -> &'static str where T: Resource {
<T as Resource>::KIND
}
pub fn version<T>(_: &T) -> &'static str where T: Resource {
<T as Resource>::VERSION
}