ci_info - Rust
Description: API documentation for the Rust `ci_info` crate.
Keywords: rust, rustlang, rust-lang, ci_info

# [−][src]Crate ci_info

# ci_info

Provides current CI environment information.

This library main goal is to provide development/build tools such as cargo-make the needed information on the current CI environment.
The code is based on the ci-info npm module.

# Examples

## Get CI environment information.

    extern crate ci_info;

    fn main() {
        let info = ci_info::get();

        println!("Is CI: {}", info.ci);
        if info.ci {
            println!("Vendor: {:#?}", info.vendor.unwrap());
        }
    }

## Check if a CI environment is detected.

    extern crate ci_info;

    fn main() {
        let ci = ci_info::is_ci();

        println!("Is CI: {}", ci);
    }

# Installation

In order to use this library, just add it as a dependency:

    [dependencies]
    ci_info = "*"

There is optional `serde` support that can be enabled via the `serde-1` feature:

    [dependencies]
    ci_info = { version = "*", features = ["serde-1"] }

# Contributing

See contributing guide

# License

Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.

## Modules

types | types

## Functions

get | Loads and returns the CI info of the current environment.
is_ci | Returns true if a CI environment is detected.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)