doc fixes (v0.1.6)

This commit is contained in:
Philipp Schuster 2021-10-11 15:36:48 +02:00
parent 89dbfc6acd
commit a92e2ec39d
4 changed files with 8 additions and 5 deletions

View File

@ -7,7 +7,7 @@ as GNU Longname. The maximum supported file name length is 100 characters includ
The maximum supported file size is 8GiB. Also, directories are not supported yet but only flat The maximum supported file size is 8GiB. Also, directories are not supported yet but only flat
collections of files. collections of files.
""" """
version = "0.1.5" version = "0.1.6"
edition = "2018" edition = "2018"
keywords = ["tar", "tarball", "archive"] keywords = ["tar", "tarball", "archive"]
categories = ["data-structures", "no-std", "parser-implementations"] categories = ["data-structures", "no-std", "parser-implementations"]

View File

@ -40,8 +40,8 @@ fn main() {
``` ```
## Alloc Feature ## Alloc Feature
This crate allows the additional Cargo build time feature `alloc`. When this is used, the crate This crate allows the usage of the additional Cargo build time feature `alloc`. When this is used,
also provides the type `TarArchive`, which owns the data on the heap. the crate also provides the type `TarArchive`, which owns the data on the heap.
## Compression (`tar.gz`) ## Compression (`tar.gz`)
If your tar file is compressed, e.g. by `.tar.gz`/`gzip`, you need to uncompress the bytes first If your tar file is compressed, e.g. by `.tar.gz`/`gzip`, you need to uncompress the bytes first

View File

@ -82,7 +82,7 @@ impl<'a> Debug for ArchiveEntry<'a> {
} }
/// Type that owns bytes on the heap, that represents a Tar archive. /// Type that owns bytes on the heap, that represents a Tar archive.
/// Unlike [`TarArchive`], this type is useful, if you need to own the /// Unlike [`TarArchiveRef`], this type is useful, if you need to own the
/// data as long as you need the archive, but not longer. /// data as long as you need the archive, but not longer.
/// ///
/// This is only available with the `alloc` feature of this crate. /// This is only available with the `alloc` feature of this crate.
@ -137,7 +137,7 @@ impl From<TarArchive> for Box<[u8]> {
} }
/// Wrapper type around bytes, which represents a Tar archive. /// Wrapper type around bytes, which represents a Tar archive.
/// Unlike [`TarArchiveRef`], this uses only a reference to data. /// Unlike [`TarArchive`], this uses only a reference to data.
#[derive(Debug)] #[derive(Debug)]
pub struct TarArchiveRef<'a> { pub struct TarArchiveRef<'a> {
data: &'a [u8], data: &'a [u8],

View File

@ -196,6 +196,9 @@ impl PosixHeader {
} }
} }
/// Describes the kind of payload, that follows after a
/// [`PosixHeader`]. The properties of this payload are
/// described inside the header.
#[derive(Debug, Copy, Clone, PartialEq)] #[derive(Debug, Copy, Clone, PartialEq)]
#[repr(u8)] #[repr(u8)]
#[allow(unused)] #[allow(unused)]