[][src]Enum cargo_whatfeatures::PkgId

pub enum PkgId {
    Remote {
        name: String,
        semver: Option<String>,
    },
    Local(PathBuf),
}

A 'pkgid' spec, either local or 'remote'

Variants

Remote

Remote path (e.g. look it up in the registry)

Fields of Remote

name: String

Name of the crate

semver: Option<String>

Specified semver

Local(PathBuf)

Local directory or file

Implementations

impl PkgId[src]

pub fn name(&self) -> &str[src]

Name of the package

pub fn is_local(&self) -> bool[src]

Whether this is a local package

Trait Implementations

impl Debug for PkgId[src]

impl Display for PkgId[src]

impl FromStr for PkgId[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

impl RefUnwindSafe for PkgId

impl Send for PkgId

impl Sync for PkgId

impl Unpin for PkgId

impl UnwindSafe for PkgId

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.