pub struct BatchBuilder { /* private fields */ }
Implementations§
Source§impl BatchBuilder
impl BatchBuilder
pub fn name(&mut self, name: impl Into<String>) -> &mut Self
pub fn attribute( &mut self, key: impl ToString, value: impl ToString, ) -> &mut Self
pub fn attributes<I, S, T>(&mut self, attrs: I) -> &mut Self
pub fn callback(&mut self, url: impl IntoUrl) -> Result<&mut Self>
Sourcepub fn new_job(
&mut self,
image: impl Into<String>,
cmd: impl Into<String>,
) -> JobBuilder<'_>
pub fn new_job( &mut self, image: impl Into<String>, cmd: impl Into<String>, ) -> JobBuilder<'_>
Get a builder to create a new job.
Sourcepub fn add_job(&mut self, spec: JobSpec) -> Result<JobBuilder<'_>>
pub fn add_job(&mut self, spec: JobSpec) -> Result<JobBuilder<'_>>
Add a job to this batch from a spec, usually created from deserialization, returns the builder.
This will error if the job has invalid parents, that is, if the job’s id is less than any parent ids.
pub async fn submit(self) -> Result<Batch>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BatchBuilder
impl !RefUnwindSafe for BatchBuilder
impl Send for BatchBuilder
impl Sync for BatchBuilder
impl Unpin for BatchBuilder
impl !UnwindSafe for BatchBuilder
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