MapPrimitiveType

Trait MapPrimitiveType 

Source
pub trait MapPrimitiveType<Val> {
    type Prim: PrimitiveType;

    // Required method
    fn type_of_literal(&self, lit: &Val) -> Self::Prim;
}
Expand description

Maps a literal value from a certain Grammar to its type. This assumes that all literals are primitive.

Required Associated Types§

Source

type Prim: PrimitiveType

Types of literals output by this mapper.

Required Methods§

Source

fn type_of_literal(&self, lit: &Val) -> Self::Prim

Gets the type of the provided literal value.

Implementors§