pub struct Container {
pub id: String,
pub pod_sandbox_id: String,
pub metadata: Option<ContainerMetadata>,
pub image: Option<ImageSpec>,
pub image_ref: String,
pub state: i32,
pub created_at: i64,
pub labels: HashMap<String, String>,
pub annotations: HashMap<String, String>,
}Expand description
Container provides the runtime information for a container, such as ID, hash, state of the container.
Fields§
§id: StringID of the container, used by the container runtime to identify a container.
pod_sandbox_id: StringID of the sandbox to which this container belongs.
metadata: Option<ContainerMetadata>Metadata of the container.
image: Option<ImageSpec>Spec of the image.
image_ref: StringReference to the image in use. For most runtimes, this should be an image ID.
state: i32State of the container.
created_at: i64Creation time of the container in nanoseconds.
labels: HashMap<String, String>Key-value pairs that may be used to scope and select individual resources.
annotations: HashMap<String, String>Unstructured key-value map holding arbitrary metadata. Annotations MUST NOT be altered by the runtime; the value of this field MUST be identical to that of the corresponding ContainerConfig used to instantiate this Container.
Implementations§
Source§impl Container
impl Container
Sourcepub fn state(&self) -> ContainerState
pub fn state(&self) -> ContainerState
Returns the enum value of state, or the default if the field is set to an invalid enum value.
Sourcepub fn set_state(&mut self, value: ContainerState)
pub fn set_state(&mut self, value: ContainerState)
Sets state to the provided enum value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Container
impl<'de> Deserialize<'de> for Container
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>,
Source§impl Message for Container
impl Message for Container
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.impl StructuralPartialEq for Container
Auto Trait Implementations§
impl Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnwindSafe for Container
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request