Struct crates_tools::CrateArchive
source · pub struct CrateArchive(/* private fields */);Expand description
Represents a .crate archive, which is a collection of files and their contents.
Implementations§
source§impl CrateArchive
impl CrateArchive
sourcepub fn download<Url>(url: Url) -> Result<Self, Error>
pub fn download<Url>(url: Url) -> Result<Self, Error>
Downloads and decodes a .crate archive from a given url.
sourcepub fn download_crates_io<N, V>(name: N, version: V) -> Result<Self, Error>
pub fn download_crates_io<N, V>(name: N, version: V) -> Result<Self, Error>
Downloads and decodes a .crate archive from crates.io repository by given name and version of the package.
Requires the full version of the package, in the format of "x.y.z"
Returns error if the package with specified name and version - not exists.
Trait Implementations§
source§impl Clone for CrateArchive
impl Clone for CrateArchive
source§fn clone(&self) -> CrateArchive
fn clone(&self) -> CrateArchive
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CrateArchive
impl Debug for CrateArchive
source§impl Default for CrateArchive
impl Default for CrateArchive
source§fn default() -> CrateArchive
fn default() -> CrateArchive
Returns the “default value” for a type. Read more
source§impl PartialEq for CrateArchive
impl PartialEq for CrateArchive
source§fn eq(&self, other: &CrateArchive) -> bool
fn eq(&self, other: &CrateArchive) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for CrateArchive
Auto Trait Implementations§
impl RefUnwindSafe for CrateArchive
impl Send for CrateArchive
impl Sync for CrateArchive
impl Unpin for CrateArchive
impl UnwindSafe for CrateArchive
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more