pub struct OccupiedEntry<'a, K> { /* private fields */ }
This is supported on crate feature client only.
Expand description

A view into a single object that exists

The object may exist because it existed at the time of call to Api::entry, or because it was created by Entry::or_insert.

Implementations

Borrow the object

Borrow the object mutably

OccupiedEntry::commit must be called afterwards for any changes to be persisted.

Let f modify the object

OccupiedEntry::commit must be called afterwards for any changes to be persisted.

Take ownership over the object

Save the object to the Kubernetes API, if any changes have been made

The OccupiedEntry is updated with the new object (including changes made by the API server, such as .metadata.resource_version).

Errors

This function can fail due to transient errors, or due to write conflicts (for example: if another client created the object between the calls to Api::entry and OccupiedEntry::commit, or because another client modified the object in the meantime).

Any retries should be coarse-grained enough to also include the call to Api::entry, so that the latest state can be fetched.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more