pub struct CrateTar {
pub crate_version: CrateVersion,
pub tar_data: Vec<u8>,
}
Expand description
Represents a tarball of a crate, including version information and tar data.
Fields§
§crate_version: CrateVersion
§tar_data: Vec<u8>
Implementations§
Source§impl CrateTar
impl CrateTar
Sourcepub fn get_file(&self, file: &str) -> Result<Option<String>>
pub fn get_file(&self, file: &str) -> Result<Option<String>>
Retrieves the content of a specified file within the crate tarball.
Sourcepub fn get_file_by_range(
&self,
file: &str,
start: impl Into<Option<NonZeroUsize>>,
end: impl Into<Option<NonZeroUsize>>,
) -> Result<Option<String>>
pub fn get_file_by_range( &self, file: &str, start: impl Into<Option<NonZeroUsize>>, end: impl Into<Option<NonZeroUsize>>, ) -> Result<Option<String>>
Retrieves the content of a specified file within a range.
Sourcepub fn get_all_file_list(
&self,
range: impl RangeBounds<usize>,
) -> Result<Option<BTreeSet<PathBuf>>>
pub fn get_all_file_list( &self, range: impl RangeBounds<usize>, ) -> Result<Option<BTreeSet<PathBuf>>>
Lists all files in the crate within a specified range.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CrateTar
impl RefUnwindSafe for CrateTar
impl Send for CrateTar
impl Sync for CrateTar
impl Unpin for CrateTar
impl UnwindSafe for CrateTar
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