[−][src]Enum noria::DataType
The main type used for user data throughout the codebase.
Having this be an enum allows for our code to be agnostic about the types of user data except when type information is specifically necessary.
Note that cloning a DataType
using the Clone
trait is possible, but may result in cache
contention on the reference counts for de-duplicated strings. Use DataType::deep_clone
to
clone the value of a DataType
without danger of contention.
Variants
An empty value.
Int(i32)
A signed 32-bit numeric value.
UnsignedInt(u32)
An unsigned 32-bit numeric value.
BigInt(i64)
A signed 64-bit numeric value.
UnsignedBigInt(u64)
An unsigned signed 64-bit numeric value.
A fixed point real value. The first field is the integer part, while the second is the fractional and must be between -999999999 and 999999999.
Text(ArcCStr)
A reference-counted string-like value.
A tiny string that fits in a pointer
Timestamp(NaiveDateTime)
A timestamp for date/time types.
Implementations
impl DataType
[src]
pub fn deep_clone(&self) -> Self
[src]
Clone the value contained within this DataType
.
This method crucially does not cause cache-line conflicts with the underlying data-store
(i.e., the owner of self
), at the cost of requiring additional allocation and copying.
pub fn is_none(&self) -> bool
[src]
Checks if this value is DataType::None
.
pub fn is_integer(&self) -> bool
[src]
Checks if this value is of an integral data type (i.e., can be converted into integral types).
pub fn is_real(&self) -> bool
[src]
Checks if this value is of a real data type (i.e., can be converted into f64
).
pub fn is_string(&self) -> bool
[src]
Checks if this value is of a string data type (i.e., can be converted into String
and
&str
).
pub fn is_datetime(&self) -> bool
[src]
Checks if this values is of a timestamp data type.
Trait Implementations
impl<'a, 'b> Add<&'b DataType> for &'a DataType
[src]
type Output = DataType
The resulting type after applying the +
operator.
fn add(self, other: &'b DataType) -> DataType
[src]
impl Clone for DataType
[src]
impl Debug for DataType
[src]
impl<'de> Deserialize<'de> for DataType
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for DataType
[src]
impl<'a, 'b> Div<&'b DataType> for &'a DataType
[src]
type Output = DataType
The resulting type after applying the /
operator.
fn div(self, other: &'b DataType) -> DataType
[src]
impl Eq for DataType
[src]
impl<'_> From<&'_ DataType> for i128
[src]
impl<'_> From<&'_ DataType> for i64
[src]
impl<'_> From<&'_ DataType> for u64
[src]
impl<'_> From<&'_ DataType> for i32
[src]
impl<'_> From<&'_ DataType> for u32
[src]
impl<'_> From<&'_ DataType> for f64
[src]
impl<'a> From<&'a DataType> for DataType
[src]
impl<'a> From<&'a DataType> for &'a str
[src]
impl<'a> From<&'a Literal> for DataType
[src]
impl<'a> From<&'a str> for DataType
[src]
impl From<DataType> for i128
[src]
impl From<DataType> for i64
[src]
impl From<DataType> for u64
[src]
impl From<DataType> for i32
[src]
impl From<DataType> for u32
[src]
impl From<DataType> for f64
[src]
impl From<Literal> for DataType
[src]
impl From<NaiveDateTime> for DataType
[src]
fn from(dt: NaiveDateTime) -> Self
[src]
impl<T> From<Option<T>> for DataType where
DataType: From<T>,
[src]
DataType: From<T>,
impl From<String> for DataType
[src]
impl From<f32> for DataType
[src]
impl From<f64> for DataType
[src]
impl From<i128> for DataType
[src]
impl From<i32> for DataType
[src]
impl From<i64> for DataType
[src]
impl From<u32> for DataType
[src]
impl From<u64> for DataType
[src]
impl From<usize> for DataType
[src]
impl Hash for DataType
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a, 'b> Mul<&'b DataType> for &'a DataType
[src]
type Output = DataType
The resulting type after applying the *
operator.
fn mul(self, other: &'b DataType) -> DataType
[src]
impl Ord for DataType
[src]
fn cmp(&self, other: &DataType) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<DataType> for DataType
[src]
impl PartialOrd<DataType> for DataType
[src]
fn partial_cmp(&self, other: &DataType) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for DataType
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for DataType
[src]
impl<'a, 'b> Sub<&'b DataType> for &'a DataType
[src]
type Output = DataType
The resulting type after applying the -
operator.
fn sub(self, other: &'b DataType) -> DataType
[src]
impl<'a> TryFrom<&'a [u8]> for DataType
[src]
type Error = &'static str
The type returned in the event of a conversion error.
fn try_from(b: &[u8]) -> Result<Self, Self::Error>
[src]
impl TryFrom<Value> for DataType
[src]
Auto Trait Implementations
impl RefUnwindSafe for DataType
impl Send for DataType
impl Sync for DataType
impl Unpin for DataType
impl UnwindSafe for DataType
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,