pub trait WorldGenerator {
    // Required methods
    fn import_interface(
        &mut self,
        resolve: &Resolve,
        name: &WorldKey,
        iface: InterfaceId,
        files: &mut Files
    );
    fn export_interface(
        &mut self,
        resolve: &Resolve,
        name: &WorldKey,
        iface: InterfaceId,
        files: &mut Files
    ) -> Result<()>;
    fn import_funcs(
        &mut self,
        resolve: &Resolve,
        world: WorldId,
        funcs: &[(&str, &Function)],
        files: &mut Files
    );
    fn export_funcs(
        &mut self,
        resolve: &Resolve,
        world: WorldId,
        funcs: &[(&str, &Function)],
        files: &mut Files
    ) -> Result<()>;
    fn import_types(
        &mut self,
        resolve: &Resolve,
        world: WorldId,
        types: &[(&str, TypeId)],
        files: &mut Files
    );
    fn finish(
        &mut self,
        resolve: &Resolve,
        world: WorldId,
        files: &mut Files
    ) -> Result<()>;

    // Provided methods
    fn generate(
        &mut self,
        resolve: &Resolve,
        id: WorldId,
        files: &mut Files
    ) -> Result<()> { ... }
    fn finish_imports(
        &mut self,
        resolve: &Resolve,
        world: WorldId,
        files: &mut Files
    ) { ... }
    fn preprocess(&mut self, resolve: &Resolve, world: WorldId) { ... }
    fn pre_export_interface(
        &mut self,
        resolve: &Resolve,
        files: &mut Files
    ) -> Result<()> { ... }
}

Required Methods§

source

fn import_interface( &mut self, resolve: &Resolve, name: &WorldKey, iface: InterfaceId, files: &mut Files )

source

fn export_interface( &mut self, resolve: &Resolve, name: &WorldKey, iface: InterfaceId, files: &mut Files ) -> Result<()>

source

fn import_funcs( &mut self, resolve: &Resolve, world: WorldId, funcs: &[(&str, &Function)], files: &mut Files )

source

fn export_funcs( &mut self, resolve: &Resolve, world: WorldId, funcs: &[(&str, &Function)], files: &mut Files ) -> Result<()>

source

fn import_types( &mut self, resolve: &Resolve, world: WorldId, types: &[(&str, TypeId)], files: &mut Files )

source

fn finish( &mut self, resolve: &Resolve, world: WorldId, files: &mut Files ) -> Result<()>

Provided Methods§

source

fn generate( &mut self, resolve: &Resolve, id: WorldId, files: &mut Files ) -> Result<()>

source

fn finish_imports( &mut self, resolve: &Resolve, world: WorldId, files: &mut Files )

source

fn preprocess(&mut self, resolve: &Resolve, world: WorldId)

source

fn pre_export_interface( &mut self, resolve: &Resolve, files: &mut Files ) -> Result<()>

Called before any exported interfaces are generated.

Implementors§