[−][src]Struct sarchive::scheduler::slurm::SlurmJobEntry
Representation of an entry in the Slurm job spool hash directories
Fields
path_: PathBuf
The full path to the job information directory
Methods
impl SlurmJobEntry
[src]
pub fn new(path: &PathBuf, id: &str, cluster: &str) -> SlurmJobEntry
[src]
Returns a new SlurmJobEntry with the given path to the job info and the given job ID
Arguments
path
- APathBuf
pointing to the directory (usually .../job.) id
- A string slice representing the job ID
Examples
let p = PathBuf::from("/var/spool/slurm/hash.2/job.1234"); let id = "1234"; let cluster = "mycluster"; let job_entry = SlurmJobEntry::new(&p, &id, &cluster); assert_eq!(job_entry.path_, p);
Trait Implementations
impl JobInfo for SlurmJobEntry
[src]
fn jobid(&self) -> String
[src]
Returns the job ID as a String
fn moment(&self) -> Instant
[src]
Returns the time the jpb entry was created by SArchive
fn cluster(&self) -> String
[src]
fn read_job_info(&mut self) -> Result<(), Error>
[src]
Populates the job entry structure with the relevant information
For Slurm, this encompasses the job script and the job environment
fn files(&self) -> Vec<(String, Vec<u8>)>
[src]
Returns a Vector
with tuples containing the filename and the
file contents for the script and environment files
fn script(&self) -> String
[src]
Returns the job script as a String
fn extra_info(&self) -> Option<HashMap<String, String>>
[src]
Returns the environment info (if any) as a HashMap, mapping env keys to values
Auto Trait Implementations
impl RefUnwindSafe for SlurmJobEntry
impl Send for SlurmJobEntry
impl Sync for SlurmJobEntry
impl Unpin for SlurmJobEntry
impl UnwindSafe for SlurmJobEntry
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,