Skip to main content

IRPrintable

Trait IRPrintable 

Source
pub trait IRPrintable {
    // Required method
    fn fmt(&self, ctx: &mut IRPrinterCtx<'_, '_>) -> Result;

    // Provided method
    fn depth(&self) -> usize { ... }
}
Expand description

Trait defining the common behavior of printable IR objects.

Required Methods§

Source

fn fmt(&self, ctx: &mut IRPrinterCtx<'_, '_>) -> Result

Format the IR object using the given context.

Provided Methods§

Source

fn depth(&self) -> usize

Computes the depth of the IR tree to give hints to the printer.

Implementors§