pub(crate) struct CratePackage {
metadata: Vec<u8>,
bytes: Vec<u8>,
}Expand description
A .crate file read for upload.
Fields§
§metadata: Vec<u8>§bytes: Vec<u8>Implementations§
Source§impl CratePackage
impl CratePackage
Sourcepub(crate) fn read(
path: &Path,
name: &str,
version: &str,
target_index: &str,
) -> Result<Self, CrateError>
pub(crate) fn read( path: &Path, name: &str, version: &str, target_index: &str, ) -> Result<Self, CrateError>
Read the crate file of name at version.
The metadata comes from the manifest Cargo wrote into the archive.
target_index is the index URL of the registry the crate goes to.
Dependencies from that registry get no registry of their own.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CratePackage
impl RefUnwindSafe for CratePackage
impl Send for CratePackage
impl Sync for CratePackage
impl Unpin for CratePackage
impl UnsafeUnpin for CratePackage
impl UnwindSafe for CratePackage
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