pub trait ForeignTypes {
// Required methods
fn lang(&self) -> ForeignLang;
fn scalar(&self, spelling: &str) -> Option<PrimitiveType>;
// Provided method
fn word(&self) -> Option<PrimitiveType> { ... }
}Expand description
How one foreign language’s types lower to fic types.
Required Methods§
Sourcefn lang(&self) -> ForeignLang
fn lang(&self) -> ForeignLang
The language this lowering is for (named in diagnostics).
Sourcefn scalar(&self, spelling: &str) -> Option<PrimitiveType>
fn scalar(&self, spelling: &str) -> Option<PrimitiveType>
A scalar spelling → fic scalar; None when fic has no representation
for it in this language (float, an opaque typedef).
Provided Methods§
Sourcefn word(&self) -> Option<PrimitiveType>
fn word(&self) -> Option<PrimitiveType>
The language’s bare machine word (ForeignType::Word); None
unless the language has one.