Skip to main content

ForeignTypes

Trait ForeignTypes 

Source
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§

Source

fn lang(&self) -> ForeignLang

The language this lowering is for (named in diagnostics).

Source

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§

Source

fn word(&self) -> Option<PrimitiveType>

The language’s bare machine word (ForeignType::Word); None unless the language has one.

Implementors§