Enum arel::value::Value

source ·
pub enum Value {
Show 18 variants Bool(ValueBool), TinyInt(ValueTinyInt), SmallInt(ValueSmallInt), Int(ValueInt), BigInt(ValueBigInt), TinyUnsigned(ValueTinyUnsigned), SmallUnsigned(ValueSmallUnsigned), Unsigned(ValueUnsigned), Float(ValueFloat), Double(ValueDouble), String(ValueString), Bytes(ValueBytes), Array(ValueArray), Json(ValueJson), ChronoTimestamp(ValueChronoTimestamp), ChronoDateTime(ValueChronoDateTime), ChronoDate(ValueChronoDate), ChronoTime(ValueChronoTime),
}

Variants§

Implementations§

source§

impl Value

source

pub fn is_null(&self) -> bool

source

pub fn set_null(&mut self)

Trait Implementations§

source§

impl<T> Add<T> for Value
where T: Into<Value>,

Examples

use arel::prelude::*;
let sub_v1: arel::sub_value::ValueInt = 1.into();
let sub_v2: arel::sub_value::ValueInt = 2.into();
let v1: arel::Value = sub_v1.into();
let v2: arel::Value = sub_v2.into();
assert_eq!(v1 + v2, arel::Value::Int(3.into()));
§

type Output = Value

The resulting type after applying the + operator.
source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
source§

impl<T> AddAssign<T> for Value
where T: Into<Value>,

source§

fn add_assign(&mut self, rhs: T)

Performs the += operation. Read more
source§

impl Clone for Value

source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Value

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Value

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<T> Div<T> for Value
where T: Into<Value>,

Examples

use arel::prelude::*;
let sub_v1: arel::sub_value::ValueInt = 1.into();
let sub_v2: arel::sub_value::ValueInt = 2.into();
let v1: arel::Value = sub_v1.into();
let v2: arel::Value = sub_v2.into();
assert_eq!(v1 + v2, arel::Value::Int(3.into()));
§

type Output = Value

The resulting type after applying the / operator.
source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
source§

impl<T> DivAssign<T> for Value
where T: Into<Value>,

source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
source§

impl<T> From<&T> for Value
where T: Clone + Into<Value>,

source§

fn from(value: &T) -> Self

Converts to this type from the input type.
source§

impl From<&str> for Value

source§

fn from(val: &str) -> Self

Converts to this type from the input type.
source§

impl From<Bytes> for Value

source§

fn from(val: Bytes) -> Self

Converts to this type from the input type.
source§

impl From<DateTime<FixedOffset>> for Value

source§

fn from(val: DateTime<FixedOffset>) -> Self

Converts to this type from the input type.
source§

impl From<DateTime<Utc>> for Value

source§

fn from(val: DateTime<Utc>) -> Self

Converts to this type from the input type.
source§

impl From<NaiveDate> for Value

source§

fn from(val: NaiveDate) -> Self

Converts to this type from the input type.
source§

impl From<NaiveDateTime> for Value

source§

fn from(val: NaiveDateTime) -> Self

Converts to this type from the input type.
source§

impl From<NaiveTime> for Value

source§

fn from(val: NaiveTime) -> Self

Converts to this type from the input type.
source§

impl<T> From<Option<T>> for Value
where T: Clone + Into<Value> + Default,

source§

fn from(value: Option<T>) -> Self

Converts to this type from the input type.
source§

impl From<String> for Value

source§

fn from(val: String) -> Self

Converts to this type from the input type.
source§

impl From<Value> for Value

source§

fn from(val: Value) -> Self

Converts to this type from the input type.
source§

impl From<ValueArray> for Value

source§

fn from(vals: ValueArray) -> Self

Converts to this type from the input type.
source§

impl From<ValueBigInt> for Value

source§

fn from(val: ValueBigInt) -> Self

Converts to this type from the input type.
source§

impl From<ValueBool> for Value

source§

fn from(val: ValueBool) -> Self

Converts to this type from the input type.
source§

impl From<ValueBytes> for Value

source§

fn from(val: ValueBytes) -> Self

Converts to this type from the input type.
source§

impl From<ValueChronoDate> for Value

source§

fn from(val: ValueChronoDate) -> Self

Converts to this type from the input type.
source§

impl From<ValueChronoDateTime> for Value

source§

fn from(val: ValueChronoDateTime) -> Self

Converts to this type from the input type.
source§

impl From<ValueChronoTime> for Value

source§

fn from(val: ValueChronoTime) -> Self

Converts to this type from the input type.
source§

impl From<ValueChronoTimestamp> for Value

source§

fn from(val: ValueChronoTimestamp) -> Self

Converts to this type from the input type.
source§

impl From<ValueDouble> for Value

source§

fn from(val: ValueDouble) -> Self

Converts to this type from the input type.
source§

impl From<ValueFloat> for Value

source§

fn from(val: ValueFloat) -> Self

Converts to this type from the input type.
source§

impl From<ValueInt> for Value

source§

fn from(val: ValueInt) -> Self

Converts to this type from the input type.
source§

impl From<ValueJson> for Value

source§

fn from(val: ValueJson) -> Self

Converts to this type from the input type.
source§

impl From<ValueSmallInt> for Value

source§

fn from(val: ValueSmallInt) -> Self

Converts to this type from the input type.
source§

impl From<ValueSmallUnsigned> for Value

source§

fn from(val: ValueSmallUnsigned) -> Self

Converts to this type from the input type.
source§

impl From<ValueString> for Value

source§

fn from(val: ValueString) -> Self

Converts to this type from the input type.
source§

impl From<ValueTinyInt> for Value

source§

fn from(val: ValueTinyInt) -> Self

Converts to this type from the input type.
source§

impl From<ValueTinyUnsigned> for Value

source§

fn from(val: ValueTinyUnsigned) -> Self

Converts to this type from the input type.
source§

impl From<ValueUnsigned> for Value

source§

fn from(val: ValueUnsigned) -> Self

Converts to this type from the input type.
source§

impl<T> From<Vec<T>> for Value
where T: Into<Value>,

source§

fn from(vals: Vec<T>) -> Self

Converts to this type from the input type.
source§

impl From<bool> for Value

source§

fn from(val: bool) -> Self

Converts to this type from the input type.
source§

impl From<f32> for Value

source§

fn from(val: f32) -> Self

Converts to this type from the input type.
source§

impl From<f64> for Value

source§

fn from(val: f64) -> Self

Converts to this type from the input type.
source§

impl From<i16> for Value

source§

fn from(val: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for Value

source§

fn from(val: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for Value

source§

fn from(val: i64) -> Self

Converts to this type from the input type.
source§

impl From<i8> for Value

source§

fn from(val: i8) -> Self

Converts to this type from the input type.
source§

impl From<u16> for Value

source§

fn from(val: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for Value

source§

fn from(val: u32) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Value

source§

fn from(val: u8) -> Self

Converts to this type from the input type.
source§

impl<T> Mul<T> for Value
where T: Into<Value>,

Examples

use arel::prelude::*;
let sub_v1: arel::sub_value::ValueInt = 1.into();
let sub_v2: arel::sub_value::ValueInt = 2.into();
let v1: arel::Value = sub_v1.into();
let v2: arel::Value = sub_v2.into();
assert_eq!(v1 + v2, arel::Value::Int(3.into()));
§

type Output = Value

The resulting type after applying the * operator.
source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
source§

impl<T> MulAssign<T> for Value
where T: Into<Value>,

source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
source§

impl Neg for Value

§

type Output = Value

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl Not for Value

§

type Output = Value

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl<T> PartialEq<Option<T>> for Value
where T: Into<Value> + Clone,

Examples

Value

use arel::prelude::*;
let v1: arel::sub_value::ValueTinyInt = 1.into();
let value: arel::Value = v1.clone().into();
assert!(value == Some(&v1));
assert!(value == Some(v1));
source§

fn eq(&self, other: &Option<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for Value

source§

fn eq(&self, other: &Value) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T> Rem<T> for Value
where T: Into<Value>,

Examples

use arel::prelude::*;
let sub_v1: arel::sub_value::ValueInt = 1.into();
let sub_v2: arel::sub_value::ValueInt = 2.into();
let v1: arel::Value = sub_v1.into();
let v2: arel::Value = sub_v2.into();
assert_eq!(v1 + v2, arel::Value::Int(3.into()));
§

type Output = Value

The resulting type after applying the % operator.
source§

fn rem(self, rhs: T) -> Self::Output

Performs the % operation. Read more
source§

impl<T> RemAssign<T> for Value
where T: Into<Value>,

source§

fn rem_assign(&mut self, rhs: T)

Performs the %= operation. Read more
source§

impl Serialize for Value

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T> Sub<T> for Value
where T: Into<Value>,

Examples

use arel::prelude::*;
let sub_v1: arel::sub_value::ValueInt = 1.into();
let sub_v2: arel::sub_value::ValueInt = 2.into();
let v1: arel::Value = sub_v1.into();
let v2: arel::Value = sub_v2.into();
assert_eq!(v1 + v2, arel::Value::Int(3.into()));
§

type Output = Value

The resulting type after applying the - operator.
source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
source§

impl<T> SubAssign<T> for Value
where T: Into<Value>,

source§

fn sub_assign(&mut self, rhs: T)

Performs the -= operation. Read more
source§

impl StructuralPartialEq for Value

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§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,