[][src]Struct find_crate::Package

pub struct Package<'a> { /* fields omitted */ }

The package data. This has information on the current package name, original package name, and specified version.

Methods

impl<'_> Package<'_>[src]

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

Returns the current package name.

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

Returns the original package name.

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

Returns true if the value returned by Package::name() is a valid rust identifier.

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

Returns true if the value returned by Package::name() is the original package name.

pub fn version(&self) -> Option<&str>[src]

Returns the version of the package.

Trait Implementations

impl<'a> Eq for Package<'a>[src]

impl<'a> PartialEq<Package<'a>> for Package<'a>[src]

impl<'a> Clone for Package<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for Package<'a>[src]

Auto Trait Implementations

impl<'a> Send for Package<'a>

impl<'a> Sync for Package<'a>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for T[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.

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

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

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