pub enum ValuePrimitiveType {
Primitive(PrimitiveValue),
NestedPrimitive(Map<String, PrimitiveValue>),
}Expand description
Arrays may contain either a primitive or an object whose values are primitives
Variants§
Primitive(PrimitiveValue)
Primitive type
NestedPrimitive(Map<String, PrimitiveValue>)
Nested shape that can only contain primitives
Implementations§
Source§impl ValuePrimitiveType
impl ValuePrimitiveType
Sourcepub fn to_prim(&self) -> Option<&PrimitiveValue>
pub fn to_prim(&self) -> Option<&PrimitiveValue>
Returns the value as a primitive
Trait Implementations§
Source§impl Clone for ValuePrimitiveType
impl Clone for ValuePrimitiveType
Source§fn clone(&self) -> ValuePrimitiveType
fn clone(&self) -> ValuePrimitiveType
Returns a duplicate 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 ValuePrimitiveType
impl Debug for ValuePrimitiveType
Source§impl<'de> Deserialize<'de> for ValuePrimitiveType
impl<'de> Deserialize<'de> for ValuePrimitiveType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ValuePrimitiveType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ValuePrimitiveType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&JSONValue> for ValuePrimitiveType
impl From<&JSONValue> for ValuePrimitiveType
Source§fn from(v: &JSONValue) -> ValuePrimitiveType
fn from(v: &JSONValue) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<&Value> for ValuePrimitiveType
impl From<&Value> for ValuePrimitiveType
Source§fn from(val: &Value) -> ValuePrimitiveType
fn from(val: &Value) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<&ValuePrimitiveType> for JSONValue
impl From<&ValuePrimitiveType> for JSONValue
Source§fn from(v: &ValuePrimitiveType) -> JSONValue
fn from(v: &ValuePrimitiveType) -> JSONValue
Converts to this type from the input type.
Source§impl From<&ValuePrimitiveType> for Map<String, PrimitiveValue>
impl From<&ValuePrimitiveType> for Map<String, PrimitiveValue>
Source§fn from(v: &ValuePrimitiveType) -> Map<String, PrimitiveValue>
fn from(v: &ValuePrimitiveType) -> Map<String, PrimitiveValue>
Converts to this type from the input type.
Source§impl From<&ValuePrimitiveType> for PrimitiveShapeType
impl From<&ValuePrimitiveType> for PrimitiveShapeType
Source§fn from(val: &ValuePrimitiveType) -> PrimitiveShapeType
fn from(val: &ValuePrimitiveType) -> PrimitiveShapeType
Converts to this type from the input type.
Source§impl From<&ValuePrimitiveType> for PrimitiveValue
impl From<&ValuePrimitiveType> for PrimitiveValue
Source§fn from(v: &ValuePrimitiveType) -> PrimitiveValue
fn from(v: &ValuePrimitiveType) -> PrimitiveValue
Converts to this type from the input type.
Source§impl<'a> From<&'a i16> for ValuePrimitiveType
impl<'a> From<&'a i16> for ValuePrimitiveType
Source§fn from(v: &i16) -> ValuePrimitiveType
fn from(v: &i16) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl<'a> From<&'a i32> for ValuePrimitiveType
impl<'a> From<&'a i32> for ValuePrimitiveType
Source§fn from(v: &i32) -> ValuePrimitiveType
fn from(v: &i32) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl<'a> From<&'a i64> for ValuePrimitiveType
impl<'a> From<&'a i64> for ValuePrimitiveType
Source§fn from(v: &i64) -> ValuePrimitiveType
fn from(v: &i64) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl<'a> From<&'a i8> for ValuePrimitiveType
impl<'a> From<&'a i8> for ValuePrimitiveType
Source§fn from(v: &i8) -> ValuePrimitiveType
fn from(v: &i8) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl<'a> From<&'a isize> for ValuePrimitiveType
impl<'a> From<&'a isize> for ValuePrimitiveType
Source§fn from(v: &isize) -> ValuePrimitiveType
fn from(v: &isize) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<&str> for ValuePrimitiveType
impl From<&str> for ValuePrimitiveType
Source§fn from(s: &str) -> ValuePrimitiveType
fn from(s: &str) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl<'a> From<&'a u16> for ValuePrimitiveType
impl<'a> From<&'a u16> for ValuePrimitiveType
Source§fn from(v: &u16) -> ValuePrimitiveType
fn from(v: &u16) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl<'a> From<&'a u32> for ValuePrimitiveType
impl<'a> From<&'a u32> for ValuePrimitiveType
Source§fn from(v: &u32) -> ValuePrimitiveType
fn from(v: &u32) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl<'a> From<&'a u64> for ValuePrimitiveType
impl<'a> From<&'a u64> for ValuePrimitiveType
Source§fn from(v: &u64) -> ValuePrimitiveType
fn from(v: &u64) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl<'a> From<&'a u8> for ValuePrimitiveType
impl<'a> From<&'a u8> for ValuePrimitiveType
Source§fn from(v: &u8) -> ValuePrimitiveType
fn from(v: &u8) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl<'a> From<&'a usize> for ValuePrimitiveType
impl<'a> From<&'a usize> for ValuePrimitiveType
Source§fn from(v: &usize) -> ValuePrimitiveType
fn from(v: &usize) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<()> for ValuePrimitiveType
impl From<()> for ValuePrimitiveType
Source§fn from(_: ()) -> ValuePrimitiveType
fn from(_: ()) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<Map<String, PrimitiveValue>> for ValuePrimitiveType
impl From<Map<String, PrimitiveValue>> for ValuePrimitiveType
Source§fn from(v: Map<String, PrimitiveValue>) -> ValuePrimitiveType
fn from(v: Map<String, PrimitiveValue>) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl<T> From<Option<T>> for ValuePrimitiveTypewhere
T: Into<ValuePrimitiveType>,
impl<T> From<Option<T>> for ValuePrimitiveTypewhere
T: Into<ValuePrimitiveType>,
Source§fn from(v: Option<T>) -> ValuePrimitiveType
fn from(v: Option<T>) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<PrimitiveValue> for ValuePrimitiveType
impl From<PrimitiveValue> for ValuePrimitiveType
Source§fn from(v: PrimitiveValue) -> ValuePrimitiveType
fn from(v: PrimitiveValue) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<String> for ValuePrimitiveType
impl From<String> for ValuePrimitiveType
Source§fn from(s: String) -> ValuePrimitiveType
fn from(s: String) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<bool> for ValuePrimitiveType
impl From<bool> for ValuePrimitiveType
Source§fn from(v: bool) -> ValuePrimitiveType
fn from(v: bool) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<f32> for ValuePrimitiveType
impl From<f32> for ValuePrimitiveType
Source§fn from(v: f32) -> ValuePrimitiveType
fn from(v: f32) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<f64> for ValuePrimitiveType
impl From<f64> for ValuePrimitiveType
Source§fn from(v: f64) -> ValuePrimitiveType
fn from(v: f64) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<i16> for ValuePrimitiveType
impl From<i16> for ValuePrimitiveType
Source§fn from(v: i16) -> ValuePrimitiveType
fn from(v: i16) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<i32> for ValuePrimitiveType
impl From<i32> for ValuePrimitiveType
Source§fn from(v: i32) -> ValuePrimitiveType
fn from(v: i32) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<i64> for ValuePrimitiveType
impl From<i64> for ValuePrimitiveType
Source§fn from(v: i64) -> ValuePrimitiveType
fn from(v: i64) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<i8> for ValuePrimitiveType
impl From<i8> for ValuePrimitiveType
Source§fn from(v: i8) -> ValuePrimitiveType
fn from(v: i8) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<isize> for ValuePrimitiveType
impl From<isize> for ValuePrimitiveType
Source§fn from(v: isize) -> ValuePrimitiveType
fn from(v: isize) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<u16> for ValuePrimitiveType
impl From<u16> for ValuePrimitiveType
Source§fn from(v: u16) -> ValuePrimitiveType
fn from(v: u16) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<u32> for ValuePrimitiveType
impl From<u32> for ValuePrimitiveType
Source§fn from(v: u32) -> ValuePrimitiveType
fn from(v: u32) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<u64> for ValuePrimitiveType
impl From<u64> for ValuePrimitiveType
Source§fn from(v: u64) -> ValuePrimitiveType
fn from(v: u64) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<u8> for ValuePrimitiveType
impl From<u8> for ValuePrimitiveType
Source§fn from(v: u8) -> ValuePrimitiveType
fn from(v: u8) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl From<usize> for ValuePrimitiveType
impl From<usize> for ValuePrimitiveType
Source§fn from(v: usize) -> ValuePrimitiveType
fn from(v: usize) -> ValuePrimitiveType
Converts to this type from the input type.
Source§impl Interpolate for ValuePrimitiveType
impl Interpolate for ValuePrimitiveType
Source§fn interpolate(&self, other: &ValuePrimitiveType, t: f64) -> ValuePrimitiveType
fn interpolate(&self, other: &ValuePrimitiveType, t: f64) -> ValuePrimitiveType
Interpolate between two of the same type
Source§impl PartialEq for ValuePrimitiveType
impl PartialEq for ValuePrimitiveType
Source§impl Serialize for ValuePrimitiveType
impl Serialize for ValuePrimitiveType
Source§fn 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 StructuralPartialEq for ValuePrimitiveType
Auto Trait Implementations§
impl Freeze for ValuePrimitiveType
impl RefUnwindSafe for ValuePrimitiveType
impl Send for ValuePrimitiveType
impl Sync for ValuePrimitiveType
impl Unpin for ValuePrimitiveType
impl UnwindSafe for ValuePrimitiveType
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