Trait arithmetic_typing::arith::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§
sourcetype Prim: PrimitiveType
type Prim: PrimitiveType
Types of literals output by this mapper.
Required Methods§
sourcefn type_of_literal(&self, lit: &Val) -> Self::Prim
fn type_of_literal(&self, lit: &Val) -> Self::Prim
Gets the type of the provided literal value.