Skip to main content

Installation

Trait Installation 

Source
pub trait Installation: Send + Sync {
    type Error: Into<Report> + Send;

    // Required method
    fn install(
        &self,
        host: &Host,
    ) -> impl Future<Output = Result<(), Self::Error>> + Send;

    // Provided method
    fn modifies_system(&self) -> bool { ... }
}
Expand description

Trait representing an installation plan for toolchain components.

Required Associated Types§

Source

type Error: Into<Report> + Send

The error type returned if installation fails.

Required Methods§

Source

fn install( &self, host: &Host, ) -> impl Future<Output = Result<(), Self::Error>> + Send

Execute the installation plan against host.

Provided Methods§

Source

fn modifies_system(&self) -> bool

Whether running the plan modifies the machine outside ~/.water (system package managers, msiexec, the Visual Studio installer). water doctor --fix requires an interactive confirmation or --yes before it runs such a plan.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Installation for ()

Source§

type Error = Report

Source§

fn install( &self, _host: &Host, ) -> impl Future<Output = Result<(), Self::Error>> + Send

Source§

impl Installation for Infallible

Source§

type Error = !

Source§

fn install( &self, _host: &Host, ) -> impl Future<Output = Result<(), Self::Error>> + Send

Source§

impl<I: Installation> Installation for Option<I>

Optional installation step.

This is used by composite toolchains (e.g. tuples) to represent “install if missing”.

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation, T3: Installation, T4: Installation, T5: Installation, T6: Installation, T7: Installation, T8: Installation, T9: Installation, T10: Installation, T11: Installation, T12: Installation, T13: Installation, T14: Installation> Installation for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation, T3: Installation, T4: Installation, T5: Installation, T6: Installation, T7: Installation, T8: Installation, T9: Installation, T10: Installation, T11: Installation, T12: Installation, T13: Installation> Installation for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation, T3: Installation, T4: Installation, T5: Installation, T6: Installation, T7: Installation, T8: Installation, T9: Installation, T10: Installation, T11: Installation, T12: Installation> Installation for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation, T3: Installation, T4: Installation, T5: Installation, T6: Installation, T7: Installation, T8: Installation, T9: Installation, T10: Installation, T11: Installation> Installation for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation, T3: Installation, T4: Installation, T5: Installation, T6: Installation, T7: Installation, T8: Installation, T9: Installation, T10: Installation> Installation for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation, T3: Installation, T4: Installation, T5: Installation, T6: Installation, T7: Installation, T8: Installation, T9: Installation> Installation for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation, T3: Installation, T4: Installation, T5: Installation, T6: Installation, T7: Installation, T8: Installation> Installation for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation, T3: Installation, T4: Installation, T5: Installation, T6: Installation, T7: Installation> Installation for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation, T3: Installation, T4: Installation, T5: Installation, T6: Installation> Installation for (T0, T1, T2, T3, T4, T5, T6)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation, T3: Installation, T4: Installation, T5: Installation> Installation for (T0, T1, T2, T3, T4, T5)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation, T3: Installation, T4: Installation> Installation for (T0, T1, T2, T3, T4)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation, T3: Installation> Installation for (T0, T1, T2, T3)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation, T2: Installation> Installation for (T0, T1, T2)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation, T1: Installation> Installation for (T0, T1)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Source§

impl<T0: Installation> Installation for (T0,)

Source§

type Error = Report

Source§

async fn install(&self, host: &Host) -> Result<(), Self::Error>

Source§

fn modifies_system(&self) -> bool

Implementors§