azure_devops/builds/methods/queue.rs
1use super::super::models::Build;
2use super::super::BuildsClient;
3use crate::constants::ApiPath;
4use crate::error::Result;
5
6impl BuildsClient<'_> {
7 /// Queue a new build.
8 ///
9 /// # Arguments
10 ///
11 /// * `project` — The project name.
12 /// * `build` — The [`Build`] object describing the build to queue.
13 ///
14 /// # Returns
15 ///
16 /// The queued [`Build`].
17 pub async fn queue(&self, project: &str, build: &Build) -> Result<Build> {
18 self.http
19 .post(&ApiPath::builds(project), &[], Some(build))
20 .await
21 }
22}