pub struct BoundMember { /* private fields */ }Expand description
One extracted member proven by its already-open member object.
A bound member carries the same size/digest evidence as
ExtractedMember, but its bytes are proven by object identity: handle
is the exact object created by the atomic handle-relative write and
verified during extraction, rewound to byte zero at handoff. Staging from
this object performs no name lookup after the handoff boundary, so a
concurrent member-entry replacement cannot redirect staged bytes.
The handle is single-owner and move-only. File cursors are shared
across clones, so this type is deliberately not Clone: move the object
into staging (see into_open_object), which
rewinds it again before reading. Never try_clone a
bound handle and assume an independent offset.
advisory_path is diagnostics only and explicitly non-authoritative: it
may be stale (root renamed) or foreign (member entry replaced) while the
handle still proves the owned bytes. Never stage by opening it.
Implementations§
Source§impl BoundMember
impl BoundMember
Sourcepub fn source_path(&self) -> &str
pub fn source_path(&self) -> &str
Returns the normalized archive path that supplied these bytes.
Sourcepub fn output_name(&self) -> &str
pub fn output_name(&self) -> &str
Returns the output filename inside the extraction root.
Sourcepub fn advisory_path(&self) -> &Path
pub fn advisory_path(&self) -> &Path
Returns the recorded member pathname for diagnostics only.
Non-authoritative: may be stale or foreign after a root
rename/replacement. Never open this path to obtain staged bytes; move
into_open_object into staging instead.
Sourcepub fn bytes_written(&self) -> u64
pub fn bytes_written(&self) -> u64
Returns the exact bytes written and verified.
Sourcepub fn handle_mut(&mut self) -> &mut File ⓘ
pub fn handle_mut(&mut self) -> &mut File ⓘ
Borrows the open member object, for example to prove cursor ownership in tests. The holder owns the shared cursor: any read/seek moves it for all borrowers, and staging rewinds to byte zero before reading.
Sourcepub fn into_open_object(self) -> File ⓘ
pub fn into_open_object(self) -> File ⓘ
Releases the already-open readable member object for staging.
The object arrives rewound to byte zero by
into_bound_sources;
staging must still rewind before reading (it does) so a cursor moved
after handoff cannot truncate staged bytes.