Trait mule::Typer[][src]

pub trait Typer: Default + 'static {
    type TypeTag: Display + Hash + Eq + Copy;
    type TypedValue: Debug + Clone;

    const TYPES: &'static [Self::TypeTag];

    fn type_value_as(
        &self,
        value: &RawValue,
        tag: Self::TypeTag
    ) -> ColumnValue<Self::TypedValue>;
fn tag_type(&self, value: &Self::TypedValue) -> Self::TypeTag; fn type_value(&self, value: &RawValue) -> ColumnValue<Self::TypedValue> { ... } }

Infers the type of a raw value

Associated Types

type TypeTag: Display + Hash + Eq + Copy[src]

Uniquely-identifying tag type for typed values

type TypedValue: Debug + Clone[src]

The type of a fully-typed single value

Loading content...

Associated Constants

const TYPES: &'static [Self::TypeTag][src]

The tags of supported types ordered by parsing priority. The earlier type tags will be attempted first.

Loading content...

Required methods

fn type_value_as(
    &self,
    value: &RawValue,
    tag: Self::TypeTag
) -> ColumnValue<Self::TypedValue>
[src]

Parse a raw value into a specific type.

fn tag_type(&self, value: &Self::TypedValue) -> Self::TypeTag[src]

Determine a tag value that identifies the type of the value

Loading content...

Provided methods

fn type_value(&self, value: &RawValue) -> ColumnValue<Self::TypedValue>[src]

Loading content...

Implementors

impl Typer for DefaultTyper[src]

type TypeTag = ValueType

type TypedValue = Value

Loading content...