pub enum Content<'a, R> {
Directory,
Symlink {
target: PathBuf,
},
File {
executable: bool,
size: u64,
offset: u64,
data: Take<&'a DecoderInner<R>>,
},
}Variants
Directory
A directory. Its children will follow as separate
File entries.
Symlink
Fields
target: PathBufA symlink with a given path. The NAR format imposes no
constraints on target, so this symlink could point to
anywhere.
File
Fields
executable: boolsize: u64offset: u64data: Take<&'a DecoderInner<R>>May be used to extract the contents of this file.
A file, either plain or executable, with the given contents.
The data field is a struct implementing std::io::Read,
so it can be read like any file. You must either read
data before calling Entries::next on the iterator, or
not read it all. Attempting to read data after calling
Entries::next is undefined behaviour, and will almost
certainly return garbage data.
Implementations
Trait Implementations
Auto Trait Implementations
impl<'a, R> !RefUnwindSafe for Content<'a, R>
impl<'a, R> !Send for Content<'a, R>
impl<'a, R> !Sync for Content<'a, R>
impl<'a, R> Unpin for Content<'a, R>
impl<'a, R> !UnwindSafe for Content<'a, R>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more