pub struct JobBuilder<'a> { /* private fields */ }Expand description
Builder for single job operations.
Provides operations for a specific job including get, retry, cancel, and logs.
§Examples
use gitlab_manager::GitLabClient;
let client = GitLabClient::new("https://gitlab.com", "token")?;
// Get job details
let job = client.job("myorg/myproject", 67890).get().await?;
// Retry a failed job
client.job("myorg/myproject", 67890).retry().await?;
// Get job logs
let logs = client.job("myorg/myproject", 67890).logs().await?;Implementations§
Source§impl<'a> JobBuilder<'a>
impl<'a> JobBuilder<'a>
Sourcepub async fn retry(self) -> Result<Job>
pub async fn retry(self) -> Result<Job>
Retry the job.
Creates a new job based on the original job.
§Errors
Returns an error if the job cannot be retried.
Sourcepub async fn cancel(self) -> Result<Job>
pub async fn cancel(self) -> Result<Job>
Cancel the job.
Stops a running or pending job.
§Errors
Returns an error if the job cannot be canceled.
Auto Trait Implementations§
impl<'a> Freeze for JobBuilder<'a>
impl<'a> !RefUnwindSafe for JobBuilder<'a>
impl<'a> Send for JobBuilder<'a>
impl<'a> Sync for JobBuilder<'a>
impl<'a> Unpin for JobBuilder<'a>
impl<'a> !UnwindSafe for JobBuilder<'a>
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
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 more