pub struct Task {Show 18 fields
pub transid: String,
pub termid: String,
pub userid: String,
pub applid: String,
pub sysid: String,
pub number: u32,
pub commarea: Option<Vec<u8>>,
pub files: HashMap<String, FileDef>,
pub ts: BTreeMap<String, TsQueue>,
pub td: BTreeMap<String, Vec<Vec<u8>>>,
pub td_files: HashMap<String, PathBuf>,
pub held: HashMap<String, Vec<u8>>,
pub browses: HashMap<(String, i64), Browse>,
pub terminal: Option<Box<dyn Terminal>>,
pub initial_aid: Option<u8>,
pub mapsets: HashMap<String, Mapset>,
pub next_transid: Option<String>,
pub returned_commarea: Option<Vec<u8>>,
}Expand description
The task: who and what started it, and the resources it has touched.
Fields§
§transid: String§termid: String§userid: String§applid: String§sysid: String§number: u32§commarea: Option<Vec<u8>>The COMMAREA the task starts with; EIBCALEN is its length.
files: HashMap<String, FileDef>§ts: BTreeMap<String, TsQueue>§td: BTreeMap<String, Vec<Vec<u8>>>§td_files: HashMap<String, PathBuf>TD queues whose items are appended to a host file as text lines when the task ends.
held: HashMap<String, Vec<u8>>The key each file’s READ UPDATE holds, for REWRITE, DELETE and UNLOCK.
browses: HashMap<(String, i64), Browse>Open browses by file and REQID.
terminal: Option<Box<dyn Terminal>>§initial_aid: Option<u8>The AID key whose input started the task, as EIBAID shows it before any RECEIVE.
mapsets: HashMap<String, Mapset>Mapsets already read from the copy libraries, by name.
next_transid: Option<String>RETURN TRANSID and COMMAREA, when the task ended that way.
returned_commarea: Option<Vec<u8>>Implementations§
Source§impl Task
impl Task
Sourcepub fn writeq_ts(
&mut self,
queue: &str,
rewrite: Option<usize>,
data: &[u8],
) -> Result<usize, &'static str>
pub fn writeq_ts( &mut self, queue: &str, rewrite: Option<usize>, data: &[u8], ) -> Result<usize, &'static str>
WRITEQ TS: appends and returns the new item’s number; with Some(item) (REWRITE) replaces that item and returns it.
Sourcepub fn readq_ts(
&mut self,
queue: &str,
item: Option<usize>,
) -> Result<(Vec<u8>, usize), &'static str>
pub fn readq_ts( &mut self, queue: &str, item: Option<usize>, ) -> Result<(Vec<u8>, usize), &'static str>
READQ TS: Some(item) reads that item; None reads the next item after the last read.
Sourcepub fn readq_td(&mut self, queue: &str) -> Result<Vec<u8>, &'static str>
pub fn readq_td(&mut self, queue: &str) -> Result<Vec<u8>, &'static str>
READQ TD: removes and returns the oldest item.
Sourcepub fn deleteq_td(&mut self, queue: &str)
pub fn deleteq_td(&mut self, queue: &str)
DELETEQ TD: empties the queue (no error when absent).