[][src]Struct jenkins_api::Jenkins

pub struct Jenkins { /* fields omitted */ }

Client struct with the methods to query Jenkins

Implementations

impl Jenkins[src]

pub fn get_object_as<Q, T>(&self, object: Path, parameters: Q) -> Result<T> where
    Q: Into<Option<AdvancedQuery>>,
    T: Deserialize<'de>, 
[src]

Get a Path from Jenkins, specifying the depth or tree parameters

Example

#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
struct LastBuild {
    number: u32,
    duration: u32,
    result: String,
}
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
struct LastBuildOfJob {
    display_name: String,
    last_build: LastBuild,
}

let _: LastBuildOfJob = jenkins.get_object_as(
    jenkins_api::client::Path::Job {
        name: "job name",
        configuration: None,
    },
    jenkins_api::client::TreeBuilder::new()
        .with_field("displayName")
        .with_field(
            jenkins_api::client::TreeBuilder::object("lastBuild")
                .with_subfield("number")
                .with_subfield("duration")
                .with_subfield("result"),
        )
        .build(),
)?;

impl Jenkins[src]

pub fn get_build<'a, J, B>(
    &self,
    job_name: J,
    build_number: B
) -> Result<CommonBuild> where
    J: Into<JobName<'a>>,
    B: Into<BuildNumber>, 
[src]

Get a build from a job_name and build_number

impl Jenkins[src]

pub fn get_home(&self) -> Result<Home>[src]

Get Jenkins Home

impl Jenkins[src]

pub fn get_job<'a, J>(&self, job_name: J) -> Result<CommonJob> where
    J: Into<JobName<'a>>, 
[src]

Get a Job from it's job_name

pub fn build_job<'a, J>(&self, job_name: J) -> Result<ShortQueueItem> where
    J: Into<JobName<'a>>, 
[src]

Build a Job from it's job_name

pub fn job_builder<'a, 'b, 'c, 'd>(
    &'b self,
    job_name: &'a str
) -> Result<JobBuilder<'a, 'b, 'c, 'd>>
[src]

Create a JobBuilder to setup a build of a Job from it's job_name

pub fn poll_scm_job<'a, J>(&self, job_name: J) -> Result<()> where
    J: Into<JobName<'a>>, 
[src]

Poll SCM of a Job from it's job_name

impl Jenkins[src]

pub fn get_nodes(&self) -> Result<ComputerSet>[src]

Get a ComputerSet

pub fn get_node<'a, C>(&self, computer_name: C) -> Result<CommonComputer> where
    C: Into<ComputerName<'a>>, 
[src]

Get a Computer

pub fn get_master_node(&self) -> Result<MasterComputer>[src]

Get the master Computer

impl Jenkins[src]

pub fn get_queue(&self) -> Result<Queue>[src]

Get the Jenkins items queue

pub fn get_queue_item(&self, id: i32) -> Result<QueueItem>[src]

Get a queue item from it's ID

impl Jenkins[src]

pub fn get_view<'a, V>(&self, view_name: V) -> Result<CommonView> where
    V: Into<ViewName<'a>>, 
[src]

Get a View

pub fn add_job_to_view<'a, 'b, V, J>(
    &self,
    view_name: V,
    job_name: J
) -> Result<()> where
    V: Into<ViewName<'a>>,
    J: Into<JobName<'a>>, 
[src]

Add the job job_name to the view view_name

pub fn remove_job_from_view<'a, 'b, V, J>(
    &self,
    view_name: V,
    job_name: J
) -> Result<()> where
    V: Into<ViewName<'a>>,
    J: Into<JobName<'a>>, 
[src]

Remove the job job_name from the view view_name

Trait Implementations

impl Debug for Jenkins[src]

Auto Trait Implementations

impl !RefUnwindSafe for Jenkins

impl Send for Jenkins

impl Sync for Jenkins

impl Unpin for Jenkins

impl !UnwindSafe for Jenkins

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.