Trait arithmetic_typing::arith::MapPrimitiveType [−][src]
pub trait MapPrimitiveType<Val> { type Prim: PrimitiveType; 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.
Associated Types
type Prim: PrimitiveType
[src]
type Prim: PrimitiveType
[src]Types of literals output by this mapper.
Required methods
fn type_of_literal(&self, lit: &Val) -> Self::Prim
[src]
fn type_of_literal(&self, lit: &Val) -> Self::Prim
[src]Gets the type of the provided literal value.
Implementors
impl<Val> MapPrimitiveType<Val> for NumArithmetic where
Val: Clone + NumOps + PartialEq,
[src]
impl<Val> MapPrimitiveType<Val> for NumArithmetic where
Val: Clone + NumOps + PartialEq,
[src]