Enum k8s_openapi_ext::intstr::IntOrString
source · [−]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
Int(i32)
String(String)
Trait Implementations
sourceimpl Clone for IntOrString
impl Clone for IntOrString
sourcefn clone(&self) -> IntOrString
fn clone(&self) -> IntOrString
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for IntOrString
impl Debug for IntOrString
sourceimpl DeepMerge for IntOrString
impl DeepMerge for IntOrString
sourcefn merge_from(&mut self, other: IntOrString)
fn merge_from(&mut self, other: IntOrString)
Merge
other
into self
.sourceimpl Default for IntOrString
impl Default for IntOrString
sourcefn default() -> IntOrString
fn default() -> IntOrString
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for IntOrString
impl<'de> Deserialize<'de> for IntOrString
sourcefn deserialize<D>(
deserializer: D
) -> Result<IntOrString, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<IntOrString, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<IntOrString> for IntOrString
impl PartialEq<IntOrString> for IntOrString
sourcefn eq(&self, other: &IntOrString) -> bool
fn eq(&self, other: &IntOrString) -> bool
sourceimpl Serialize for IntOrString
impl Serialize for IntOrString
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for IntOrString
impl StructuralEq for IntOrString
impl StructuralPartialEq for IntOrString
Auto Trait Implementations
impl RefUnwindSafe for IntOrString
impl Send for IntOrString
impl Sync for IntOrString
impl Unpin for IntOrString
impl UnwindSafe for IntOrString
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more