pub trait PartialObjectMetaExt: Sealed {
    // Required methods
    fn into_request_partial<K: Resource<DynamicType = ()>>(
        self
    ) -> PartialObjectMeta<K>;
    fn into_response_partial<K>(self) -> PartialObjectMeta<K>;
}
Expand description

Helper trait for converting ObjectMeta into useful PartialObjectMeta variants

Required Methods§

source

fn into_request_partial<K: Resource<DynamicType = ()>>( self ) -> PartialObjectMeta<K>

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

source

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.

Implementors§