pub struct DataType { /* private fields */ }
Expand description
DataType
is just a String defining what data type is being used
Implementations§
source§impl DataType
impl DataType
sourcepub fn valid(&self) -> Result<()>
pub fn valid(&self) -> Result<()>
Determine if a datatype specified in a flow is a valid datatype or not
sourcepub fn is_generic(&self) -> bool
pub fn is_generic(&self) -> bool
Return true if this datatype is generic (not specified at compile time and can contain any other datatype) or not
sourcepub fn array_type(&self) -> Option<DataType>
pub fn array_type(&self) -> Option<DataType>
If an Array –> Return Option of the DataType the array holds If Generic –> Return Generic If not an Array –> Return None
sourcepub fn value_type(value: &Value) -> DataType
pub fn value_type(value: &Value) -> DataType
Return the DataType
for a Json Value
, including nested values in arrays or maps
sourcepub fn type_array_order(&self) -> i32
pub fn type_array_order(&self) -> i32
Determine how deeply nested in arrays this DataType is. If not an array, returns 0
This is used at compile time by the compiler to determine the array order of an input or output
sourcepub fn value_array_order(value: &Value) -> i32
pub fn value_array_order(value: &Value) -> i32
Determine how deeply nested in arrays this serde_json::value::Value is. If not an array, returns 0
This is used at run time to determine the array order of an actual value being processed
sourcepub fn compatible_types(
from: &[DataType],
to: &[DataType],
from_subroute: &Route
) -> Result<()>
pub fn compatible_types( from: &[DataType], to: &[DataType], from_subroute: &Route ) -> Result<()>
For a set of output types to be compatible with a destination’s set of types ALL of the output_types must have a compatible input type, to guarantee that any of the valid types produced can be handled by the destination
Trait Implementations§
source§impl<'de> Deserialize<'de> for DataType
impl<'de> Deserialize<'de> for DataType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl Ord for DataType
impl Ord for DataType
source§impl PartialEq for DataType
impl PartialEq for DataType
source§impl PartialOrd for DataType
impl PartialOrd for DataType
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for DataType
impl StructuralEq for DataType
impl StructuralPartialEq for DataType
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§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.