Struct syntax::crateid::CrateId[src]

pub struct CrateId {
    pub path: String,
    pub name: String,
    pub version: Option<String>,
}

Fields

path

A path which represents the codes origin. By convention this is the URL, without http:// or https:// prefix, to the crate's repository

name

The name of the crate.

version

The version of the crate.

Methods

impl CrateId

fn version_or_default<'a>(&'a self) -> &'a str

fn short_name_with_version(&self) -> String

fn matches(&self, other: &CrateId) -> bool

Trait Implementations

impl Show for CrateId

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

impl FromStr for CrateId

fn from_str(s: &str) -> Option<CrateId>

Derived Implementations

impl PartialEq for CrateId

fn eq(&self, __arg_0: &CrateId) -> bool

fn ne(&self, __arg_0: &CrateId) -> bool

impl Clone for CrateId

fn clone(&self) -> CrateId

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