pub enum Content<'a, R> {
Directory,
Symlink {
target: Utf8PathBuf,
},
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
A symlink with a given path. The NAR format imposes no
constraints on target
, so this symlink could point to
anywhere.
Fields
§
target: Utf8PathBuf
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> Freeze for Content<'a, R>
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§
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