Enum entity::Value [−][src]
Represents either a primitive or complex value
Variants
Primitive(Primitive)
Text(String)
Implementations
impl Value
[src]
pub fn is_type(&self, type: ValueType) -> bool
[src]
Returns true if this value is of the specified type
pub fn to_type(&self) -> ValueType
[src]
Returns the type of this value
pub fn has_same_type(&self, other: &Value) -> bool
[src]
Returns true if this value and the other value are of the same type
pub fn is_complex(&self) -> bool
[src]
Returns true if not representing a primitive value
pub fn is_primitive(&self) -> bool
[src]
Returns true if representing a primitive value
pub fn to_primitive(&self) -> Option<Primitive>
[src]
Converts into underlying primitive value if representing one
pub fn to_primitive_type(&self) -> Option<PrimitiveType>
[src]
Converts into underlying primitive type if representing one
Trait Implementations
impl Clone for Value
[src]
impl Debug for Value
[src]
impl Eq for Value
[src]
impl<'a> From<&'a OsStr> for Value
[src]
impl<'a> From<&'a Path> for Value
[src]
impl<'a> From<&'a Value> for ValueType
[src]
fn from(v: &'a Value) -> Self
[src]
Produces the type of the referenced value by recursively iterating through complex types, assuming that the first value in types like list represent the entire set, defaulting to a primitive unit if a complex value does not have any items
impl<'a> From<&'a str> for Value
[src]
impl<T: ValueLike> From<BTreeMap<String, T>> for Value
[src]
impl<T: ValueLike + Ord> From<BTreeSet<T>> for Value
[src]
impl<T: ValueLike + Ord> From<BinaryHeap<T>> for Value
[src]
fn from(x: BinaryHeap<T>) -> Self
[src]
impl<T: ValueLike> From<HashMap<String, T, RandomState>> for Value
[src]
impl<T: ValueLike + Hash + Eq> From<HashSet<T, RandomState>> for Value
[src]
impl<T: ValueLike> From<LinkedList<T>> for Value
[src]
fn from(x: LinkedList<T>) -> Self
[src]
impl<T: ValueLike> From<Option<T>> for Value
[src]
impl From<OsString> for Value
[src]
impl From<PathBuf> for Value
[src]
impl From<Primitive> for Value
[src]
impl From<String> for Value
[src]
impl From<Value> for ValueType
[src]
impl<T: ValueLike> From<Vec<T, Global>> for Value
[src]
impl<T: ValueLike> From<VecDeque<T>> for Value
[src]
impl From<bool> for Value
[src]
impl From<char> for Value
[src]
impl From<f32> for Value
[src]
impl From<f64> for Value
[src]
impl From<i128> for Value
[src]
impl From<i16> for Value
[src]
impl From<i32> for Value
[src]
impl From<i64> for Value
[src]
impl From<i8> for Value
[src]
impl From<isize> for Value
[src]
impl From<u128> for Value
[src]
impl From<u16> for Value
[src]
impl From<u32> for Value
[src]
impl From<u64> for Value
[src]
impl From<u8> for Value
[src]
impl From<usize> for Value
[src]
impl Hash for Value
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Value> for Value
[src]
fn eq(&self, other: &Self) -> bool
[src]
Compares two values of same type for equality, otherwise returns false
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Value> for Value
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
Compares same variants for ordering, otherwise returns none
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl TryFrom<Value> for Primitive
[src]
type Error = Value
The type returned in the event of a conversion error.
fn try_from(x: Value) -> Result<Self, Self::Error>
[src]
impl ValueLike for Value
[src]
fn into_value(self) -> Value
[src]
fn try_from_value(value: Value) -> Result<Self, Value>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,