Trait kube_client::api::PartialObjectMetaExt
source · pub trait PartialObjectMetaExt: Sealed {
// Required methods
fn into_request_partial<K>(self) -> PartialObjectMeta<K>
where K: Resource<DynamicType = ()>;
fn into_response_partial<K>(self) -> PartialObjectMeta<K>;
}Available on crate feature
client only.Expand description
Helper trait for converting ObjectMeta into useful PartialObjectMeta variants
Required Methods§
sourcefn into_request_partial<K>(self) -> PartialObjectMeta<K>where
K: Resource<DynamicType = ()>,
fn into_request_partial<K>(self) -> PartialObjectMeta<K>where K: Resource<DynamicType = ()>,
Convert ObjectMeta into a Patch-serializable PartialObjectMeta
This object can be passed to Patch::Apply and used with Api::patch_metadata,
for an Api<K> using the underlying types TypeMeta
sourcefn into_response_partial<K>(self) -> PartialObjectMeta<K>
fn into_response_partial<K>(self) -> PartialObjectMeta<K>
Convert ObjectMeta into a response object for a specific Resource
This object emulates a response object and cannot be used in request bodies
because it contains erased TypeMeta (and the apiserver is doing the erasing).
This method is useful when unit testing local behaviour.