pub struct Entry<'a> { /* private fields */ }Expand description
One entry, borrowed from the archive it came from.
The reader is deliberately not Send. It was until Phase 2’s first
real container, and the bound was unsound to require: tar::Entry holds
&Archive<dyn Read> over a RefCell, so it is !Send for any reader,
and every container built on the tar crate would have had to assert
unsafe impl Send for a property that is false — a lie that becomes UB
the day anything actually sends one.
Nothing needs it. An entry borrows the archive it came from
(ArchiveRead::next_entry(&mut self) -> Entry<'_>), so sending an entry
to another thread would mean sending the archive with it, and no caller in
this tree does either: entries are read on the thread that asked for
them. Dropping the bound is strictly more permissive, so a container whose
reader IS Send is unaffected.