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 JsonSchema for IntOrString
impl JsonSchema for IntOrString
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(__gen: &mut SchemaGenerator) -> Schema
fn json_schema(__gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.