pub struct Job {
pub id: String,
pub status: Status,
pub token: Option<String>,
pub server: Option<String>,
pub callback: Option<String>,
pub conversion: Vec<Conversion>,
pub input: Vec<InputFile>,
pub output: Vec<OutputFile>,
pub errors: Vec<JobMessage>,
pub warnings: Vec<JobMessage>,
pub raw: Value,
}Expand description
A conversion job — the central resource. Create it, (upload | add a remote input), start it, poll it to a terminal status, then download its outputs.
Fields§
§id: String§status: Status§token: Option<String>Per-job upload token (X-Oc-Token); never the account key.
server: Option<String>Per-job upload server base URL.
callback: Option<String>§conversion: Vec<Conversion>§input: Vec<InputFile>§output: Vec<OutputFile>§errors: Vec<JobMessage>§warnings: Vec<JobMessage>§raw: ValueThe full decoded response, for fields not surfaced as typed accessors.
Implementations§
Source§impl Job
impl Job
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Whether the job finished successfully.
Sourcepub fn is_canceled(&self) -> bool
pub fn is_canceled(&self) -> bool
Whether the job was canceled.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Whether the job reached a terminal status (completed/failed/canceled).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Job
impl RefUnwindSafe for Job
impl Send for Job
impl Sync for Job
impl Unpin for Job
impl UnsafeUnpin for Job
impl UnwindSafe for Job
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