Struct kube_core::discovery::ApiResource [−][src]
pub struct ApiResource {
pub group: String,
pub version: String,
pub api_version: String,
pub kind: String,
pub plural: String,
}Expand description
Information about a Kubernetes API resource
Enough information to use it like a Resource by passing it to the dynamic Api
constructors like Api::all_with and Api::namespaced_with.
Fields
group: StringResource group, empty for core group.
version: Stringgroup version
api_version: StringapiVersion of the resource (v1 for core group, groupName/groupVersions for other).
kind: StringSingular PascalCase name of the resource
plural: StringPlural name of the resource
Implementations
Creates an ApiResource by type-erasing a Resource
Creates an ApiResource from group, version, kind and plural name.
Creates an ApiResource from group, version and kind.
Warning
This function will guess the resource plural name.
Usually, this is ok, but for CRDs with complex pluralisations it can fail.
If you are getting your values from kube_derive use the generated method for giving you an ApiResource.
Otherwise consider using ApiResource::from_gvk_with_plural
to explicitly set the plural, or run api discovery on it via kube::discovery.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for ApiResourceimpl Send for ApiResourceimpl Sync for ApiResourceimpl Unpin for ApiResourceimpl UnwindSafe for ApiResourceBlanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.