Struct jenkins_api::Jenkins

source ·
pub struct Jenkins { /* private fields */ }
Expand description

Client struct with the methods to query Jenkins

Implementations§

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(),
)?;

Get a build from a job_name and build_number

Get Jenkins Home

Get a Job from it’s job_name

Build a Job from it’s job_name

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

Poll SCM of a Job from it’s job_name

Get a ComputerSet

Get a Computer

Get the master Computer

Get the Jenkins items queue

Get a queue item from it’s ID

Get a View

Add the job job_name to the view view_name

Remove the job job_name from the view view_name

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.