[][src]Enum entity::PrimitiveValue

pub enum PrimitiveValue {
    Bool(bool),
    Char(char),
    Number(Number),
    Unit,
}

Represents a primitive value

Variants

Bool(bool)
Char(char)
Number(Number)
Unit

Implementations

impl PrimitiveValue[src]

pub fn is_type(&self, r#type: PrimitiveValueType) -> bool[src]

Returns true if this value is of the specified type

pub fn to_type(&self) -> PrimitiveValueType[src]

Returns the type of this value

pub fn has_same_type(&self, other: &PrimitiveValue) -> bool[src]

Returns true if this value and the other value are of the same type

Trait Implementations

impl Clone for PrimitiveValue[src]

impl Copy for PrimitiveValue[src]

impl Debug for PrimitiveValue[src]

impl Eq for PrimitiveValue[src]

Value is considered equal, ignoring the fact that NaN != NaN for floats

impl<'a> From<&'a PrimitiveValue> for PrimitiveValueType[src]

impl From<()> for PrimitiveValue[src]

impl From<Number> for PrimitiveValue[src]

impl From<PrimitiveValue> for Value[src]

pub fn from(v: PrimitiveValue) -> Self[src]

Converts a primitive value into a value without any allocation

impl From<PrimitiveValue> for PrimitiveValueType[src]

impl From<bool> for PrimitiveValue[src]

impl From<char> for PrimitiveValue[src]

impl From<f32> for PrimitiveValue[src]

impl From<f64> for PrimitiveValue[src]

impl From<i128> for PrimitiveValue[src]

impl From<i16> for PrimitiveValue[src]

impl From<i32> for PrimitiveValue[src]

impl From<i64> for PrimitiveValue[src]

impl From<i8> for PrimitiveValue[src]

impl From<isize> for PrimitiveValue[src]

impl From<u128> for PrimitiveValue[src]

impl From<u16> for PrimitiveValue[src]

impl From<u32> for PrimitiveValue[src]

impl From<u64> for PrimitiveValue[src]

impl From<u8> for PrimitiveValue[src]

impl From<usize> for PrimitiveValue[src]

impl Hash for PrimitiveValue[src]

impl PartialEq<PrimitiveValue> for PrimitiveValue[src]

pub fn eq(&self, other: &Self) -> bool[src]

Compares two primitive values of same type for equality, otherwise returns false

impl PartialOrd<PrimitiveValue> for PrimitiveValue[src]

pub fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]

Compares same variants of same type for ordering, otherwise returns none

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.