pub struct RunUnit<'w> {
pub mem: Vec<u8>,
pub depth: usize,
pub programs: Vec<Loaded>,
pub dds: Dds,
pub sysin: Option<Box<dyn BufRead + 'w>>,
pub clock: Clock,
pub out: &'w mut dyn Write,
pub err: &'w mut dyn Write,
pub cics: Option<Task>,
pub eib: usize,
pub cics_files: HashMap<String, Open>,
/* private fields */
}Fields§
§mem: Vec<u8>§depth: usizePERFORMs and CALLs in progress, across every program.
programs: Vec<Loaded>§dds: Dds§sysin: Option<Box<dyn BufRead + 'w>>§clock: Clock§out: &'w mut dyn Write§err: &'w mut dyn Write§cics: Option<Task>The CICS task a harness run stands in for, with its EXEC interface block and open files.
eib: usize§cics_files: HashMap<String, Open>Implementations§
Source§impl<'w> RunUnit<'w>
impl<'w> RunUnit<'w>
pub fn new( library: Library, dds: Dds, sysin: Option<Box<dyn BufRead + 'w>>, clock: Clock, out: &'w mut dyn Write, err: &'w mut dyn Write, ) -> Self
Sourcepub fn add(
&mut self,
compiled: Option<Rc<Compiled>>,
program: &Program,
size: usize,
) -> usize
pub fn add( &mut self, compiled: Option<Rc<Compiled>>, program: &Program, size: usize, ) -> usize
Adds a program to the run unit and gives it its storage.
Sourcepub fn push_temporary(&mut self, bytes: &[u8]) -> usize
pub fn push_temporary(&mut self, bytes: &[u8]) -> usize
Storage for a BY CONTENT or BY VALUE argument, at the end of memory.
Sourcepub fn release_temporaries(&mut self, mark: usize)
pub fn release_temporaries(&mut self, mark: usize)
Releases arguments pushed since mark, unless a program was loaded behind them.
pub fn find(&self, name: &str) -> Option<usize>
Sourcepub fn load(&mut self, name: &str) -> Result<usize, LoadError>
pub fn load(&mut self, name: &str) -> Result<usize, LoadError>
The program CALL names, compiling and loading it the first time.
Sourcepub fn close_all(&mut self) -> Result<(), String>
pub fn close_all(&mut self) -> Result<(), String>
Closes every file any program left open, as the runtime does when the run unit ends.
pub fn copy_libraries(&self) -> &Libraries
pub fn return_code(&self) -> i16
Auto Trait Implementations§
impl<'w> !RefUnwindSafe for RunUnit<'w>
impl<'w> !Send for RunUnit<'w>
impl<'w> !Sync for RunUnit<'w>
impl<'w> !UnwindSafe for RunUnit<'w>
impl<'w> Freeze for RunUnit<'w>
impl<'w> Unpin for RunUnit<'w>
impl<'w> UnsafeUnpin for RunUnit<'w>
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