pub struct ObjectMeta {
pub name: String,
pub namespace: String,
pub uid: String,
pub resource_version: u64,
pub generation: u64,
pub creation_timestamp: DateTime<Utc>,
pub deletion_timestamp: Option<DateTime<Utc>>,
pub labels: HashMap<String, String>,
pub annotations: HashMap<String, String>,
pub owner_references: Vec<OwnerReference>,
pub finalizers: Vec<String>,
}Expand description
Object metadata
Fields§
§name: StringResource name
namespace: StringNamespace
uid: StringUnique identifier
resource_version: u64Resource version for optimistic concurrency
generation: u64Generation (incremented on spec changes)
creation_timestamp: DateTime<Utc>Creation timestamp
deletion_timestamp: Option<DateTime<Utc>>Deletion timestamp (if being deleted)
labels: HashMap<String, String>Labels
annotations: HashMap<String, String>Annotations
owner_references: Vec<OwnerReference>Owner references
finalizers: Vec<String>Finalizers
Implementations§
Source§impl ObjectMeta
impl ObjectMeta
Sourcepub fn with_annotation(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_annotation( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Add annotation
Sourcepub fn with_finalizer(self, finalizer: impl Into<String>) -> Self
pub fn with_finalizer(self, finalizer: impl Into<String>) -> Self
Add finalizer
Sourcepub fn bump_version(&mut self)
pub fn bump_version(&mut self)
Increment resource version
Sourcepub fn bump_generation(&mut self)
pub fn bump_generation(&mut self)
Increment generation
Trait Implementations§
Source§impl Clone for ObjectMeta
impl Clone for ObjectMeta
Source§fn clone(&self) -> ObjectMeta
fn clone(&self) -> ObjectMeta
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObjectMeta
impl Debug for ObjectMeta
Source§impl<'de> Deserialize<'de> for ObjectMeta
impl<'de> Deserialize<'de> for ObjectMeta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ObjectMeta
impl RefUnwindSafe for ObjectMeta
impl Send for ObjectMeta
impl Sync for ObjectMeta
impl Unpin for ObjectMeta
impl UnwindSafe for ObjectMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more