trait CodeType: Debug {
    // Required method
    fn type_label(&self) -> String;

    // Provided methods
    fn canonical_name(&self) -> String { ... }
    fn literal(&self, _literal: &Literal) -> String { ... }
    fn ffi_converter_name(&self) -> String { ... }
    fn imports(&self) -> Option<Vec<String>> { ... }
    fn initialization_fn(&self) -> Option<String> { ... }
}
Expand description

A trait tor the implementation.

Required Methods§

source

fn type_label(&self) -> String

The language specific label used to reference this type. This will be used in method signatures and property declarations.

Provided Methods§

source

fn canonical_name(&self) -> String

A representation of this type label that can be used as part of another identifier. e.g. read_foo(), or FooInternals.

This is especially useful when creating specialized objects or methods to deal with this type only.

source

fn literal(&self, _literal: &Literal) -> String

source

fn ffi_converter_name(&self) -> String

Name of the FfiConverter

This is the object that contains the lower, write, lift, and read methods for this type.

source

fn imports(&self) -> Option<Vec<String>>

A list of imports that are needed if this type is in use. Classes are imported exactly once.

source

fn initialization_fn(&self) -> Option<String>

Function to run at startup

Implementors§