cargo_mobile2::target

Trait TargetTrait

source
pub trait TargetTrait<'a>: Debug + Sized {
    const DEFAULT_KEY: &'static str;

    // Required methods
    fn all() -> &'a BTreeMap<&'a str, Self>;
    fn name_list() -> Vec<&'a str>;
    fn triple(&'a self) -> &'a str;
    fn arch(&'a self) -> &'a str;

    // Provided methods
    fn default_ref() -> &'a Self { ... }
    fn for_name(name: &str) -> Option<&'a Self> { ... }
    fn for_arch(arch: &str) -> Option<&'a Self> { ... }
    fn install(&'a self) -> Result<ExitStatus, Error> { ... }
    fn install_all() -> Result<(), Error>
       where Self: 'a { ... }
}

Required Associated Constants§

source

const DEFAULT_KEY: &'static str

Required Methods§

source

fn all() -> &'a BTreeMap<&'a str, Self>

source

fn name_list() -> Vec<&'a str>

source

fn triple(&'a self) -> &'a str

source

fn arch(&'a self) -> &'a str

Provided Methods§

source

fn default_ref() -> &'a Self

source

fn for_name(name: &str) -> Option<&'a Self>

source

fn for_arch(arch: &str) -> Option<&'a Self>

source

fn install(&'a self) -> Result<ExitStatus, Error>

source

fn install_all() -> Result<(), Error>
where Self: 'a,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

source§

impl<'a> TargetTrait<'a> for Target<'a>

source§

const DEFAULT_KEY: &'static str = "aarch64"