pub struct Modules {
pub dirs: Vec<PathBuf>,
/* private fields */
}Fields§
§dirs: Vec<PathBuf>Searched in order for NAME.iwm.
Implementations§
Source§impl Modules
impl Modules
pub fn new( dirs: Vec<PathBuf>, check: fn(&Program) -> Result<(), String>, ) -> Modules
Sourcepub fn add(&mut self, path: PathBuf, module: LoadedModule) -> usize
pub fn add(&mut self, path: PathBuf, module: LoadedModule) -> usize
Registers a module read from path, whose programs are found by name from now on; its
number is what Modules::take takes.
Sourcepub fn take(
&mut self,
k: usize,
ordinal: usize,
) -> Option<Result<LoadedProgram<Rc<Code>>, String>>
pub fn take( &mut self, k: usize, ordinal: usize, ) -> Option<Result<LoadedProgram<Rc<Code>>, String>>
Program ordinal of module k for the run unit, checked; None once taken.
Sourcepub fn loaded(
&mut self,
name: &str,
) -> Option<Result<LoadedProgram<Rc<Code>>, LoadError>>
pub fn loaded( &mut self, name: &str, ) -> Option<Result<LoadedProgram<Rc<Code>>, LoadError>>
A program of a module already read that no CALL has taken, by the name a CALL gives: the first such module, and in it the lowest ordinal.
Sourcepub fn search(
&mut self,
name: &str,
) -> Result<LoadedProgram<Rc<Code>>, LoadError>
pub fn search( &mut self, name: &str, ) -> Result<LoadedProgram<Rc<Code>>, LoadError>
NAME.iwm, then name.iwm, in each directory in turn. A module found that cannot be read,
or that holds no program NAME, is an error, not “not found”.
Sourcepub fn holder(&self, entry: &str) -> Option<String>
pub fn holder(&self, entry: &str) -> Option<String>
The PROGRAM-ID of a program not yet taken, of a module already read, with this ENTRY name.
Sourcepub fn loaded_class(
&mut self,
external: &str,
) -> Result<Option<FoundClass<Rc<ClassCode<Rc<Code>>>>>, String>
pub fn loaded_class( &mut self, external: &str, ) -> Result<Option<FoundClass<Rc<ClassCode<Rc<Code>>>>>, String>
The COBOL class definition of this external name in a module already read, not yet taken.
Auto Trait Implementations§
impl Freeze for Modules
impl RefUnwindSafe for Modules
impl Send for Modules
impl Sync for Modules
impl Unpin for Modules
impl UnsafeUnpin for Modules
impl UnwindSafe for Modules
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more