Enum k8s_openapi::apimachinery::pkg::util::intstr::IntOrString
source · pub enum IntOrString {
Int(i32),
String(String),
}
Expand description
IntOrString 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 IntOrString
impl Clone for IntOrString
source§fn clone(&self) -> IntOrString
fn clone(&self) -> IntOrString
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 IntOrString
impl Debug for IntOrString
source§impl DeepMerge for IntOrString
impl DeepMerge for IntOrString
source§fn merge_from(&mut self, other: Self)
fn merge_from(&mut self, other: Self)
Merge
other
into self
.source§impl Default for IntOrString
impl Default for IntOrString
source§impl<'de> Deserialize<'de> for IntOrString
impl<'de> Deserialize<'de> for IntOrString
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 PartialEq<IntOrString> for IntOrString
impl PartialEq<IntOrString> for IntOrString
source§fn eq(&self, other: &IntOrString) -> bool
fn eq(&self, other: &IntOrString) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.