[][src]Struct rustwide::Crate

pub struct Crate(_);

A Rust crate that can be used with rustwide.

Implementations

impl Crate[src]

pub fn crates_io(name: &str, version: &str) -> Self[src]

Load a crate from the crates.io registry.

pub fn git(url: &str) -> Self[src]

Load a crate from a git repository. The full URL needed to clone the repo has to be provided.

pub fn local(path: &Path) -> Self[src]

Load a crate from a directory in the local filesystem.

pub fn fetch(&self, workspace: &Workspace) -> Result<(), Error>[src]

Fetch the crate's source code and cache it in the workspace. This method will reach out to the network for some crate types.

pub fn purge_from_cache(&self, workspace: &Workspace) -> Result<(), Error>[src]

Remove the cached copy of this crate. The method will do nothing if the crate isn't cached.

pub fn git_commit(&self, workspace: &Workspace) -> Option<String>[src]

Get this crate's git commit. This method is best-effort, and currently works just for git crates. If the commit can't be retrieved None will be returned.

Trait Implementations

impl Display for Crate[src]

Auto Trait Implementations

impl RefUnwindSafe for Crate

impl Send for Crate

impl Sync for Crate

impl Unpin for Crate

impl UnwindSafe for Crate

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,