Enum k8s_openapi::apimachinery::pkg::apis::meta::v1::WatchEvent
source · pub enum WatchEvent<T> {
Added(T),
Deleted(T),
Modified(T),
Bookmark {
annotations: BTreeMap<String, String>,
resource_version: String,
},
ErrorStatus(Status),
ErrorOther(RawExtension),
}
Expand description
Event represents a single event to a watched resource.
Object is:
- If Type is Added or Modified: the new state of the object.
- If Type is Deleted: the state of the object immediately before deletion.
- If Type is Error: *Status is recommended; other types may make sense depending on context.
Variants§
Trait Implementations§
source§impl<T: Clone> Clone for WatchEvent<T>
impl<T: Clone> Clone for WatchEvent<T>
source§fn clone(&self) -> WatchEvent<T>
fn clone(&self) -> WatchEvent<T>
Returns a copy 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<T: Debug> Debug for WatchEvent<T>
impl<T: Debug> Debug for WatchEvent<T>
source§impl<'de, T> Deserialize<'de> for WatchEvent<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for WatchEvent<T>where
T: Deserialize<'de>,
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
source§impl<T> JsonSchema for WatchEvent<T>
impl<T> JsonSchema for WatchEvent<T>
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(__gen: &mut SchemaGenerator) -> Schema
fn json_schema(__gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl<T: PartialEq> PartialEq for WatchEvent<T>
impl<T: PartialEq> PartialEq for WatchEvent<T>
source§impl<T> Serialize for WatchEvent<T>where
T: Serialize,
impl<T> Serialize for WatchEvent<T>where
T: Serialize,
impl<T> StructuralPartialEq for WatchEvent<T>
Auto Trait Implementations§
impl<T> Freeze for WatchEvent<T>where
T: Freeze,
impl<T> RefUnwindSafe for WatchEvent<T>where
T: RefUnwindSafe,
impl<T> Send for WatchEvent<T>where
T: Send,
impl<T> Sync for WatchEvent<T>where
T: Sync,
impl<T> Unpin for WatchEvent<T>where
T: Unpin,
impl<T> UnwindSafe for WatchEvent<T>where
T: UnwindSafe,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)