pub struct ProcessingJobBuilder { /* private fields */ }Expand description
Builder for ProcessingJob entity
Provides a fluent API for constructing ProcessingJob instances. System fields (id, metadata, timestamps) are auto-initialized.
Implementations§
Source§impl ProcessingJobBuilder
impl ProcessingJobBuilder
Sourcepub fn job_type(self, value: ProcessingJobType) -> Self
pub fn job_type(self, value: ProcessingJobType) -> Self
Set the job_type field (required)
Sourcepub fn status(self, value: JobStatus) -> Self
pub fn status(self, value: JobStatus) -> Self
Set the status field (default: JobStatus::default())
Sourcepub fn input_data(self, value: Value) -> Self
pub fn input_data(self, value: Value) -> Self
Set the input_data field (optional)
Sourcepub fn result_data(self, value: Value) -> Self
pub fn result_data(self, value: Value) -> Self
Set the result_data field (optional)
Sourcepub fn error_message(self, value: String) -> Self
pub fn error_message(self, value: String) -> Self
Set the error_message field (optional)
Sourcepub fn started_at(self, value: DateTime<Utc>) -> Self
pub fn started_at(self, value: DateTime<Utc>) -> Self
Set the started_at field (optional)
Sourcepub fn completed_at(self, value: DateTime<Utc>) -> Self
pub fn completed_at(self, value: DateTime<Utc>) -> Self
Set the completed_at field (optional)
Sourcepub fn retry_count(self, value: i32) -> Self
pub fn retry_count(self, value: i32) -> Self
Set the retry_count field (default: 0)
Sourcepub fn max_retries(self, value: i32) -> Self
pub fn max_retries(self, value: i32) -> Self
Set the max_retries field (default: 3)
Sourcepub fn build(self) -> Result<ProcessingJob, String>
pub fn build(self) -> Result<ProcessingJob, String>
Build the ProcessingJob entity
Returns Err if any required field without a default is missing.
Trait Implementations§
Source§impl Clone for ProcessingJobBuilder
impl Clone for ProcessingJobBuilder
Source§impl Debug for ProcessingJobBuilder
impl Debug for ProcessingJobBuilder
Auto Trait Implementations§
impl Freeze for ProcessingJobBuilder
impl RefUnwindSafe for ProcessingJobBuilder
impl Send for ProcessingJobBuilder
impl Sync for ProcessingJobBuilder
impl Unpin for ProcessingJobBuilder
impl UnsafeUnpin for ProcessingJobBuilder
impl UnwindSafe for ProcessingJobBuilder
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.