pub enum PrimitiveValue {
String(String),
U64(u64),
I64(i64),
F32(f32),
F64(f64),
Bool(bool),
Null,
}Expand description
Primitive types supported by Properties
Variants§
String(String)
String type utf8 encoded
U64(u64)
unsigned 64 bit integer
I64(i64)
signed 64 bit integer
F32(f32)
floating point number
F64(f64)
double precision floating point number
Bool(bool)
boolean
Null
null
Implementations§
Source§impl PrimitiveValue
impl PrimitiveValue
Sourcepub fn default_from_shape(shape: &PrimitiveShape) -> PrimitiveValue
pub fn default_from_shape(shape: &PrimitiveShape) -> PrimitiveValue
Get the default primitive value from a shape
Trait Implementations§
Source§impl Clone for PrimitiveValue
impl Clone for PrimitiveValue
Source§fn clone(&self) -> PrimitiveValue
fn clone(&self) -> PrimitiveValue
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 PrimitiveValue
impl Debug for PrimitiveValue
Source§impl Default for PrimitiveValue
impl Default for PrimitiveValue
Source§fn default() -> PrimitiveValue
fn default() -> PrimitiveValue
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PrimitiveValue
impl<'de> Deserialize<'de> for PrimitiveValue
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PrimitiveValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PrimitiveValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&JSONValue> for PrimitiveValue
impl From<&JSONValue> for PrimitiveValue
Source§fn from(v: &JSONValue) -> PrimitiveValue
fn from(v: &JSONValue) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<&PrimitiveValue> for JSONValue
impl From<&PrimitiveValue> for JSONValue
Source§fn from(v: &PrimitiveValue) -> JSONValue
fn from(v: &PrimitiveValue) -> JSONValue
Converts to this type from the input type.
Source§impl From<&PrimitiveValue> for PrimitiveShape
impl From<&PrimitiveValue> for PrimitiveShape
Source§fn from(val: &PrimitiveValue) -> PrimitiveShape
fn from(val: &PrimitiveValue) -> PrimitiveShape
Converts to this type from the input type.
Source§impl From<&PrimitiveValue> for PrimitiveValue
impl From<&PrimitiveValue> for PrimitiveValue
Source§fn from(mval: &PrimitiveValue) -> PrimitiveValue
fn from(mval: &PrimitiveValue) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<&PrimitiveValue> for ValueType
impl From<&PrimitiveValue> for ValueType
Source§fn from(mval: &PrimitiveValue) -> ValueType
fn from(mval: &PrimitiveValue) -> ValueType
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 From<&ValueType> for PrimitiveValue
impl From<&ValueType> for PrimitiveValue
Source§fn from(val: &ValueType) -> PrimitiveValue
fn from(val: &ValueType) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<&str> for PrimitiveValue
impl From<&str> for PrimitiveValue
Source§fn from(s: &str) -> PrimitiveValue
fn from(s: &str) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<()> for PrimitiveValue
impl From<()> for PrimitiveValue
Source§fn from(_: ()) -> PrimitiveValue
fn from(_: ()) -> PrimitiveValue
Converts to this type from the input type.
Source§impl<T> From<Option<T>> for PrimitiveValuewhere
T: Into<PrimitiveValue>,
impl<T> From<Option<T>> for PrimitiveValuewhere
T: Into<PrimitiveValue>,
Source§fn from(v: Option<T>) -> PrimitiveValue
fn from(v: Option<T>) -> PrimitiveValue
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 PrimitiveValue
impl From<String> for PrimitiveValue
Source§fn from(s: String) -> PrimitiveValue
fn from(s: String) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<bool> for PrimitiveValue
impl From<bool> for PrimitiveValue
Source§fn from(v: bool) -> PrimitiveValue
fn from(v: bool) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<f32> for PrimitiveValue
impl From<f32> for PrimitiveValue
Source§fn from(v: f32) -> PrimitiveValue
fn from(v: f32) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<f64> for PrimitiveValue
impl From<f64> for PrimitiveValue
Source§fn from(v: f64) -> PrimitiveValue
fn from(v: f64) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<i16> for PrimitiveValue
impl From<i16> for PrimitiveValue
Source§fn from(v: i16) -> PrimitiveValue
fn from(v: i16) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<i32> for PrimitiveValue
impl From<i32> for PrimitiveValue
Source§fn from(v: i32) -> PrimitiveValue
fn from(v: i32) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<i64> for PrimitiveValue
impl From<i64> for PrimitiveValue
Source§fn from(v: i64) -> PrimitiveValue
fn from(v: i64) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<i8> for PrimitiveValue
impl From<i8> for PrimitiveValue
Source§fn from(v: i8) -> PrimitiveValue
fn from(v: i8) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<isize> for PrimitiveValue
impl From<isize> for PrimitiveValue
Source§fn from(v: isize) -> PrimitiveValue
fn from(v: isize) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<u16> for PrimitiveValue
impl From<u16> for PrimitiveValue
Source§fn from(v: u16) -> PrimitiveValue
fn from(v: u16) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<u32> for PrimitiveValue
impl From<u32> for PrimitiveValue
Source§fn from(v: u32) -> PrimitiveValue
fn from(v: u32) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<u64> for PrimitiveValue
impl From<u64> for PrimitiveValue
Source§fn from(v: u64) -> PrimitiveValue
fn from(v: u64) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<u8> for PrimitiveValue
impl From<u8> for PrimitiveValue
Source§fn from(v: u8) -> PrimitiveValue
fn from(v: u8) -> PrimitiveValue
Converts to this type from the input type.
Source§impl From<usize> for PrimitiveValue
impl From<usize> for PrimitiveValue
Source§fn from(v: usize) -> PrimitiveValue
fn from(v: usize) -> PrimitiveValue
Converts to this type from the input type.
Source§impl Interpolate for PrimitiveValue
impl Interpolate for PrimitiveValue
Source§fn interpolate(&self, other: &PrimitiveValue, t: f64) -> PrimitiveValue
fn interpolate(&self, other: &PrimitiveValue, t: f64) -> PrimitiveValue
Interpolate between two of the same type
Source§impl Ord for PrimitiveValue
impl Ord for PrimitiveValue
Source§fn cmp(&self, other: &PrimitiveValue) -> Ordering
fn cmp(&self, other: &PrimitiveValue) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PrimitiveValue
impl PartialEq for PrimitiveValue
Source§impl PartialOrd for PrimitiveValue
impl PartialOrd for PrimitiveValue
Source§impl ProtoRead for PrimitiveValue
impl ProtoRead for PrimitiveValue
Source§impl ProtoWrite for PrimitiveValue
impl ProtoWrite for PrimitiveValue
Source§impl Serialize for PrimitiveValue
impl Serialize for PrimitiveValue
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 Eq for PrimitiveValue
Auto Trait Implementations§
impl Freeze for PrimitiveValue
impl RefUnwindSafe for PrimitiveValue
impl Send for PrimitiveValue
impl Sync for PrimitiveValue
impl Unpin for PrimitiveValue
impl UnwindSafe for PrimitiveValue
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