Struct Ci

Source
pub struct Ci { /* private fields */ }

Implementations§

Source§

impl Ci

Source

pub fn new() -> Option<Self>

Source

pub fn which_ci() -> CiService

Source

pub fn lang() -> Option<String>

Returns the locale setting, g.e. en_US.UTF-8.

Source

pub fn path() -> Option<String>

Returns the search path.

Source

pub fn home() -> Option<String>

Returns the path to the users home directory.

Source

pub fn is_travis(&self) -> bool

Source

pub fn is_circle(&self) -> bool

Source

pub fn branch(&self) -> Option<String>

Source

pub fn build_url(&self) -> Option<String>

Circle only A permanent link to the current build, for example, https://circleci.com/gh/circleci/frontend/933

Source

pub fn build_id(&self) -> Option<String>

Returns the build number. TODO: convert this to a number.

Source

pub fn build_dir(&self) -> Option<String>

Travis only: The absolute path to the directory where the repository being built has been copied on the worker. TODO: Return a filesystem path instead?

Source

pub fn commit(&self) -> Option<String>

The sha1 hash of the commit being tested.

Source

pub fn pull_request(&self) -> Option<String>

The number of the pull request this build forms part of. If this build is not part of a pull request, None is returned. TODO: convert this to a number.

Source

pub fn dart(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn go(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn haxe(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn java(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn julia(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn node(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn otp(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn perl(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn php(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn python(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn r(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn ruby(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn rust(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Source

pub fn scala(&self) -> Option<String>

Travis only: Returns the version of the language that is used.

Trait Implementations§

Source§

impl Display for Ci

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Ci

§

impl RefUnwindSafe for Ci

§

impl Send for Ci

§

impl Sync for Ci

§

impl Unpin for Ci

§

impl UnwindSafe for Ci

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.