Skip to main content

Loader

Trait Loader 

Source
pub trait Loader<H> {
    // Required methods
    fn program(&mut self, name: &str) -> Result<LoadedProgram<H>, LoadError>;
    fn holder(&self, entry: &str) -> Option<String>;
    fn entry(program: &H, name: &str) -> Option<usize>;
    fn shape(program: &H) -> (usize, usize);
    fn nested(program: &H) -> &[String];
    fn source(program: &H, file: usize) -> Option<String>;
    fn class(
        &mut self,
        external: &str,
    ) -> Result<Option<FoundClass<Rc<ClassCode<H>>>>, String>;
    fn mapset(&mut self, name: &str) -> Option<Result<Mapset, String>>;
}
Expand description

Where CALL finds programs, and what the run unit needs to know about one it loaded.

Required Methods§

Source

fn program(&mut self, name: &str) -> Result<LoadedProgram<H>, LoadError>

The program whose PROGRAM-ID CALL names, compiled.

Source

fn holder(&self, entry: &str) -> Option<String>

The PROGRAM-ID of a program not yet loaded that has an ENTRY of this name.

Source

fn entry(program: &H, name: &str) -> Option<usize>

Which of a loaded program’s ENTRY statements has this name.

Source

fn shape(program: &H) -> (usize, usize)

A loaded program’s file count and storage size.

Source

fn nested(program: &H) -> &[String]

The PROGRAM-IDs of the programs a loaded program contains, which a CANCEL of it reaches.

Source

fn source(program: &H, file: usize) -> Option<String>

Source file file of a loaded program’s source table, by name.

Source

fn class( &mut self, external: &str, ) -> Result<Option<FoundClass<Rc<ClassCode<H>>>>, String>

The COBOL class definition of this external name, its data and methods each a program the executor runs; None for a Java class.

Source

fn mapset(&mut self, name: &str) -> Option<Result<Mapset, String>>

A BMS mapset from the copy libraries, which SEND MAP and RECEIVE MAP read; None when no library holds it.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§