Skip to main content

BuildsClient

Struct BuildsClient 

Source
pub struct BuildsClient<'a> { /* private fields */ }

Implementations§

Source§

impl BuildsClient<'_>

Source

pub async fn list_definitions( &self, project: &str, name: Option<&str>, top: Option<i32>, ) -> Result<Vec<BuildDefinition>>

List build definitions in a project.

§Arguments
  • project — The project name.
  • name — Optional name filter.
  • top — Optional maximum number of definitions to return.
§Returns

A Vec<BuildDefinition>.

Source§

impl BuildsClient<'_>

Source

pub async fn get_definition( &self, project: &str, id: i64, ) -> Result<BuildDefinition>

Get a build definition by its ID.

§Arguments
  • project — The project name.
  • id — The build definition ID.
§Returns

The BuildDefinition with steps, variables, triggers, etc.

Source§

impl BuildsClient<'_>

Source

pub async fn get_definition_revisions( &self, project: &str, id: i64, ) -> Result<Vec<BuildDefinitionRevision>>

Source§

impl BuildsClient<'_>

Source

pub async fn list( &self, project: &str, options: &ListBuildsOptions, ) -> Result<Vec<Build>>

List builds in a project with optional filtering.

§Arguments
  • project — The project name.
  • options — ListBuildsOptions for filtering by definition, status, etc.
§Returns

A Vec<Build> matching the criteria.

Source§

impl BuildsClient<'_>

Source

pub async fn get(&self, project: &str, id: i64) -> Result<Build>

Get a single build by its ID.

§Arguments
  • project — The project name.
  • id — The build ID.
§Returns

The Build object with full details.

Source§

impl BuildsClient<'_>

Source

pub async fn queue(&self, project: &str, build: &Build) -> Result<Build>

Queue a new build.

§Arguments
  • project — The project name.
  • build — The Build object describing the build to queue.
§Returns

The queued Build.

Source§

impl BuildsClient<'_>

Source

pub async fn get_latest( &self, project: &str, def: i64, branch: Option<&str>, ) -> Result<Build>

Get the latest build for a definition, optionally filtered by branch.

§Arguments
  • project — The project name.
  • def — The build definition ID.
  • branch — Optional branch name filter.
§Returns

The latest Build matching the criteria.

Source§

impl BuildsClient<'_>

Source

pub async fn get_tags(&self, project: &str, id: i64) -> Result<Vec<String>>

Source§

impl BuildsClient<'_>

Source

pub async fn add_tag( &self, project: &str, id: i64, tag: &str, ) -> Result<Vec<String>>

Add a tag to a build.

§Arguments
  • project — The project name.
  • id — The build ID.
  • tag — The tag string to add.
§Returns

A Vec<String> of all tags on the build after the addition.

Source§

impl BuildsClient<'_>

Source

pub async fn get_timeline(&self, project: &str, id: i64) -> Result<Timeline>

Get the timeline (step-by-step records) for a build.

§Arguments
  • project — The project name.
  • id — The build ID.
§Returns

The Timeline with all task and phase records.

Source§

impl BuildsClient<'_>

Source

pub async fn list_logs(&self, project: &str, id: i64) -> Result<Vec<BuildLog>>

Source§

impl BuildsClient<'_>

Source

pub async fn list_artifacts( &self, project: &str, id: i64, ) -> Result<Vec<BuildArtifact>>

Source§

impl BuildsClient<'_>

Source

pub async fn get_artifact( &self, project: &str, id: i64, name: &str, ) -> Result<BuildArtifact>

Source§

impl BuildsClient<'_>

Source

pub async fn list_changes( &self, project: &str, id: i64, ) -> Result<Vec<BuildChange>>

Source§

impl BuildsClient<'_>

Source

pub async fn get_project_metrics( &self, project: &str, ) -> Result<Vec<BuildMetric>>

Source§

impl BuildsClient<'_>

Source

pub async fn get_definition_metrics( &self, project: &str, id: i64, ) -> Result<Vec<BuildMetric>>

Source§

impl BuildsClient<'_>

Source

pub fn status_badge_url(&self, definition_id: i64) -> String

Trait Implementations§

Source§

impl<'a> Clone for BuildsClient<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for BuildsClient<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for BuildsClient<'a>

§

impl<'a> !UnwindSafe for BuildsClient<'a>

§

impl<'a> Freeze for BuildsClient<'a>

§

impl<'a> Send for BuildsClient<'a>

§

impl<'a> Sync for BuildsClient<'a>

§

impl<'a> Unpin for BuildsClient<'a>

§

impl<'a> UnsafeUnpin for BuildsClient<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more