Skip to main content

Module type_map

Module type_map 

Source
Expand description

Assura-to-Rust type mapping (Int -> i64, Nat -> u64, etc.). Reverse type mapping: Rust types to Assura types.

The forward mapping (Assura -> Rust) lives in map_type_token() in lib.rs. This module provides the inverse: given a Rust type string, produce the canonical Assura type. Used by AI contract generation templates and the assura infer command.

Functionsยง

rust_type_to_assura
Map a Rust type string to its Assura equivalent.
rust_type_to_assura_lenient
Like rust_type_to_assura, but maps unrecognized Rust types to Unknown instead of passing them through. Also handles impl Trait, dyn Trait, Self, and lifetime annotations that the standard mapper does not.