Struct kube::Resource [−][src]
pub struct Resource { pub api_version: String, pub group: String, pub kind: String, pub version: String, pub namespace: Option<String>, }
Expand description
The Resource information needed to operate a kubernetes client
Fields
api_version: String
The API version of the resource.
This is a composite of Resource::GROUP and Resource::VERSION (eg “apiextensions.k8s.io/v1beta1”) or just the version for resources without a group (eg “v1”). This is the string used in the apiVersion field of the resource’s serialized form.
group: String
The group of the resource
or the empty string if the resource doesn’t have a group.
kind: String
The kind of the resource.
This is the string used in the kind field of the resource’s serialized form.
version: String
The version of the resource.
namespace: Option<String>
The namespace if the resource resides (if namespaced)
Implementations
impl Resource
[src]
impl Resource
[src]impl Resource
[src]
impl Resource
[src]Convenience methods found from API conventions
pub fn watch(&self, lp: &ListParams, ver: &str) -> Result<Request<Vec<u8>>>
[src]
pub fn watch(&self, lp: &ListParams, ver: &str) -> Result<Request<Vec<u8>>>
[src]Watch a resource at a given version
pub fn create(&self, pp: &PostParams, data: Vec<u8>) -> Result<Request<Vec<u8>>>
[src]
pub fn create(&self, pp: &PostParams, data: Vec<u8>) -> Result<Request<Vec<u8>>>
[src]Create an instance of a resource
pub fn delete(&self, name: &str, dp: &DeleteParams) -> Result<Request<Vec<u8>>>
[src]
pub fn delete(&self, name: &str, dp: &DeleteParams) -> Result<Request<Vec<u8>>>
[src]Delete an instance of a resource
pub fn delete_collection(&self, lp: &ListParams) -> Result<Request<Vec<u8>>>
[src]
pub fn delete_collection(&self, lp: &ListParams) -> Result<Request<Vec<u8>>>
[src]Delete a collection of a resource
impl Resource
[src]
impl Resource
[src]Scale subresource
pub fn get_scale(&self, name: &str) -> Result<Request<Vec<u8>>>
[src]
pub fn get_scale(&self, name: &str) -> Result<Request<Vec<u8>>>
[src]Get an instance of the scale subresource
pub fn patch_scale(
&self,
name: &str,
pp: &PatchParams,
patch: Vec<u8>
) -> Result<Request<Vec<u8>>>
[src]
pub fn patch_scale(
&self,
name: &str,
pp: &PatchParams,
patch: Vec<u8>
) -> Result<Request<Vec<u8>>>
[src]Patch an instance of the scale subresource
pub fn replace_scale(
&self,
name: &str,
pp: &PostParams,
data: Vec<u8>
) -> Result<Request<Vec<u8>>>
[src]
pub fn replace_scale(
&self,
name: &str,
pp: &PostParams,
data: Vec<u8>
) -> Result<Request<Vec<u8>>>
[src]Replace an instance of the scale subresource
impl Resource
[src]
impl Resource
[src]Status subresource
pub fn get_status(&self, name: &str) -> Result<Request<Vec<u8>>>
[src]
pub fn get_status(&self, name: &str) -> Result<Request<Vec<u8>>>
[src]Get an instance of the status subresource
pub fn patch_status(
&self,
name: &str,
pp: &PatchParams,
patch: Vec<u8>
) -> Result<Request<Vec<u8>>>
[src]
pub fn patch_status(
&self,
name: &str,
pp: &PatchParams,
patch: Vec<u8>
) -> Result<Request<Vec<u8>>>
[src]Patch an instance of the status subresource
pub fn replace_status(
&self,
name: &str,
pp: &PostParams,
data: Vec<u8>
) -> Result<Request<Vec<u8>>>
[src]
pub fn replace_status(
&self,
name: &str,
pp: &PostParams,
data: Vec<u8>
) -> Result<Request<Vec<u8>>>
[src]Replace an instance of the status subresource
impl Resource
[src]
impl Resource
[src]Trait Implementations
impl From<CustomResource> for Resource
[src]
impl From<CustomResource> for Resource
[src]Make Resource useable on CRDs without k8s_openapi
fn from(c: CustomResource) -> Self
[src]
fn from(c: CustomResource) -> Self
[src]Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnwindSafe for Resource
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more