[−][src]Struct kube::api::Object
A standard kubernetes object with .spec and .status
This is used instead of a full struct for Deployment, Pod, Node, CRD, ...
Kubernetes' API generally exposes core structs in this manner, but sometimes the
status, U, is missing, and is therefore wrapped in Option.
The reasons we use this wrapper rather than the actual structs are:
- metadata field requirement for generic Informers is impossible (no field level traits)
- you cannot implement traits for objects you don't own => no addon traits to k8s-openapi
This struct appears in ObjectList and WatchEvent, and when using a Reflector,
and is exposed as the values in ObjectMap.
Fields
types: TypeMetametadata: ObjectMetaResource metadata
Contains information common to most resources about the Resource, including the object name, annotations, labels and more.
spec: PThe Spec struct of a resource. I.e. PodSpec, DeploymentSpec, etc.
This defines the desired state of the Resource as specified by the user.
status: Option<U>The Status of a resource. I.e. PotStatus, DeploymentStatus, etc.
This publishes the state of the Resource as observed by the controller.
Internally passed as Option<()> when a status does not exist.
Trait Implementations
impl<P, U> KubeObject for Object<P, U> where
P: Clone,
U: Clone, [src]
P: Clone,
U: Clone,
Blanked implementation for standard objects that can use Object
fn meta(&self) -> &ObjectMeta[src]
impl<P: Clone, U: Clone> Clone for Object<P, U> where
P: Clone,
U: Clone, [src]
P: Clone,
U: Clone,
fn clone(&self) -> Object<P, U>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<P, U> Serialize for Object<P, U> where
P: Clone,
U: Clone,
P: Serialize,
U: Serialize, [src]
P: Clone,
U: Clone,
P: Serialize,
U: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
impl<'de, P, U> Deserialize<'de> for Object<P, U> where
P: Clone,
U: Clone,
P: Deserialize<'de>,
U: Deserialize<'de>,
U: Default, [src]
P: Clone,
U: Clone,
P: Deserialize<'de>,
U: Deserialize<'de>,
U: Default,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl<P, U> Send for Object<P, U> where
P: Send,
U: Send,
P: Send,
U: Send,
impl<P, U> Unpin for Object<P, U> where
P: Unpin,
U: Unpin,
P: Unpin,
U: Unpin,
impl<P, U> Sync for Object<P, U> where
P: Sync,
U: Sync,
P: Sync,
U: Sync,
impl<P, U> UnwindSafe for Object<P, U> where
P: UnwindSafe,
U: UnwindSafe,
P: UnwindSafe,
U: UnwindSafe,
impl<P, U> RefUnwindSafe for Object<P, U> where
P: RefUnwindSafe,
U: RefUnwindSafe,
P: RefUnwindSafe,
U: RefUnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,