pub struct JobRecord {
pub id: JobId,
pub printer_name: String,
pub state: JobState,
pub reasons: PrinterReason,
pub message: String,
pub created_at: SystemTime,
pub completed_at: Option<SystemTime>,
pub cancel_flag: Arc<AtomicBool>,
}Expand description
One job in the per-server registry.
Fields§
§id: JobId§printer_name: String§state: JobState§reasons: PrinterReason§message: String§created_at: SystemTime§completed_at: Option<SystemTime>§cancel_flag: Arc<AtomicBool>Flipped by Cancel-Job so the worker can short-circuit.
Implementations§
Source§impl JobRecord
impl JobRecord
Sourcepub fn created_secs(&self) -> i32
pub fn created_secs(&self) -> i32
Seconds since epoch for time-at-creation / time-at-completed.
Sourcepub fn completed_secs(&self) -> Option<i32>
pub fn completed_secs(&self) -> Option<i32>
Seconds since epoch for time-at-completed. None while still active.
Sourcepub fn is_canceled(&self) -> bool
pub fn is_canceled(&self) -> bool
True once Cancel-Job has been observed. Workers should check this
between scanlines / pages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JobRecord
impl RefUnwindSafe for JobRecord
impl Send for JobRecord
impl Sync for JobRecord
impl Unpin for JobRecord
impl UnsafeUnpin for JobRecord
impl UnwindSafe for JobRecord
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