pub struct RustPackage { /* private fields */ }Expand description
A handle to one crate. Coords are authoritative (read from the columns).
Bytes are lazy — call RustPackage::bytes.
Implementations§
Source§impl RustPackage
impl RustPackage
Sourcepub fn relative_path(&self) -> &str
pub fn relative_path(&self) -> &str
This package’s row key in the archive — its relative_path column.
The typed views answer by COORDINATE; this is the other direction, and it is what lets a caller holding a package handle ask the lookup sub-index (or fold a per-file digest, which is path-bound) without having to list the whole archive to find the row it already has.
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Authoritative crate name (from the crate_name column, not a path parse).
Sourcepub fn bytes(&self) -> Result<Vec<u8>>
pub fn bytes(&self) -> Result<Vec<u8>>
LAZY: pread + decompress the crate bytes. The only I/O of the read API.
Sourcepub fn into_bytes(self) -> Result<Vec<u8>>
pub fn into_bytes(self) -> Result<Vec<u8>>
Consume into the crate bytes.
Auto Trait Implementations§
impl Freeze for RustPackage
impl RefUnwindSafe for RustPackage
impl Send for RustPackage
impl Sync for RustPackage
impl Unpin for RustPackage
impl UnsafeUnpin for RustPackage
impl UnwindSafe for RustPackage
Blanket Implementations§
impl<T> Allocation for T
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