Struct Toolchain

Source
pub struct Toolchain {
    pub toolchain: Vec<Version>,
    pub target: Option<Target>,
    pub components: Vec<Component>,
    pub cache: Option<bool>,
    pub cache_directories: Vec<String>,
    pub cache_workspaces: Vec<String>,
    pub cache_on_failure: Option<bool>,
    pub cache_key: Option<String>,
    pub matcher: Option<bool>,
    pub rust_flags: Option<RustFlags>,
    pub override_default: Option<bool>,
}
Expand description

A Rust representation for the inputs of the setup-rust action. More information can be found here. NOTE: The public API should be close to the original action as much as possible.

Fields§

§toolchain: Vec<Version>§target: Option<Target>§components: Vec<Component>§cache: Option<bool>§cache_directories: Vec<String>§cache_workspaces: Vec<String>§cache_on_failure: Option<bool>§cache_key: Option<String>§matcher: Option<bool>§rust_flags: Option<RustFlags>§override_default: Option<bool>

Implementations§

Source§

impl Toolchain

Source

pub fn toolchain(self, value: impl Into<Vec<Version>>) -> Self

Sets the toolchain field of this struct.

Source

pub fn components(self, value: impl Into<Vec<Component>>) -> Self

Sets the components field of this struct.

Source

pub fn cache(self, value: impl Into<bool>) -> Self

Sets the cache field of this struct.

Source

pub fn cache_directories(self, value: impl Into<Vec<String>>) -> Self

Sets the cache_directories field of this struct.

Source

pub fn cache_workspaces(self, value: impl Into<Vec<String>>) -> Self

Sets the cache_workspaces field of this struct.

Source

pub fn cache_on_failure(self, value: impl Into<bool>) -> Self

Sets the cache_on_failure field of this struct.

Source

pub fn cache_key(self, value: impl Into<String>) -> Self

Sets the cache_key field of this struct.

Source

pub fn matcher(self, value: impl Into<bool>) -> Self

Sets the matcher field of this struct.

Source

pub fn rust_flags(self, value: impl Into<RustFlags>) -> Self

Sets the rust_flags field of this struct.

Source

pub fn override_default(self, value: impl Into<bool>) -> Self

Sets the override_default field of this struct.

Source§

impl Toolchain

Source

pub fn add_version(self, version: Version) -> Self

Source

pub fn add_component(self, component: Component) -> Self

Source

pub fn add_stable(self) -> Self

Source

pub fn add_nightly(self) -> Self

Source

pub fn add_clippy(self) -> Self

Source

pub fn add_fmt(self) -> Self

Source

pub fn target( self, arch: Arch, vendor: Vendor, system: System, abi: Option<Abi>, ) -> Self

Trait Implementations§

Source§

impl Clone for Toolchain

Source§

fn clone(&self) -> Toolchain

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Toolchain

Source§

fn default() -> Toolchain

Returns the “default value” for a type. Read more
Source§

impl From<Toolchain> for Step<Use>

Source§

fn from(value: Toolchain) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.