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 for IntOrString
impl PartialEq for IntOrString
source§impl Serialize for IntOrString
impl Serialize for IntOrString
impl Eq for IntOrString
impl StructuralPartialEq for IntOrString
Auto Trait Implementations§
impl Freeze for IntOrString
impl RefUnwindSafe for IntOrString
impl Send for IntOrString
impl Sync for IntOrString
impl Unpin for IntOrString
impl UnwindSafe for IntOrString
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)