Enum k8_types::Int32OrString
source · pub enum Int32OrString {
Int(i32),
String(String),
}Expand description
See: https://github.com/kubernetes/apimachinery/blob/master/pkg/util/intstr/intstr.go Int32OrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.
Variants§
Trait Implementations§
source§impl Clone for Int32OrString
impl Clone for Int32OrString
source§fn clone(&self) -> Int32OrString
fn clone(&self) -> Int32OrString
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 Debug for Int32OrString
impl Debug for Int32OrString
source§impl Default for Int32OrString
impl Default for Int32OrString
source§impl<'de> Deserialize<'de> for Int32OrString
impl<'de> Deserialize<'de> for Int32OrString
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 From<i32> for Int32OrString
impl From<i32> for Int32OrString
source§impl FromStr for Int32OrString
impl FromStr for Int32OrString
source§impl PartialEq<Int32OrString> for Int32OrString
impl PartialEq<Int32OrString> for Int32OrString
source§fn eq(&self, other: &Int32OrString) -> bool
fn eq(&self, other: &Int32OrString) -> bool
This method tests for
self and other values to be equal, and is used
by ==.