Struct mcai_worker_sdk::job::JobResult
source · pub struct JobResult { /* private fields */ }
Implementations§
source§impl JobResult
impl JobResult
pub fn new(job_id: u64) -> JobResult
pub fn with_status(self, status: JobStatus) -> Self
pub fn with_error(self, error: Error) -> Self
pub fn with_message(self, message: &str) -> Self
pub fn with_parameters(self, parameters: &mut Vec<Parameter>) -> Self
pub fn with_destination_paths(self, destination_paths: &mut Vec<String>) -> Self
pub fn with_json<T>(self, id: &str, serializable: &T) -> Result<Self, String>
pub fn get_job_id(&self) -> u64
pub fn get_str_job_id(&self) -> String
pub fn get_status(&self) -> &JobStatus
pub fn get_datetime(&self) -> DateTime<Utc>
pub fn get_execution_duration(&self) -> f64
pub fn get_parameters(&self) -> &Vec<Parameter>
pub fn get_destination_paths(&self) -> &Vec<String>
pub fn update_execution_durations(&mut self)
Trait Implementations§
source§impl<'de> Deserialize<'de> for JobResult
impl<'de> Deserialize<'de> for JobResult
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl ParametersContainer for JobResult
impl ParametersContainer for JobResult
fn get_parameters(&self) -> &Vec<Parameter>
fn get_parameter<T>(&self, key: &str) -> Result<T>where
T: ParameterValue + DeserializeOwned,
fn get_parameters_as_map(&self) -> HashMap<String, String>
source§impl PartialEq for JobResult
impl PartialEq for JobResult
impl Eq for JobResult
Auto Trait Implementations§
impl RefUnwindSafe for JobResult
impl Send for JobResult
impl Sync for JobResult
impl Unpin for JobResult
impl UnwindSafe for JobResult
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
§impl<T> CloneAny for T
impl<T> CloneAny for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.