pub struct RetainedInput { /* private fields */ }Expand description
One observed object version. A replacement invalidates the preceding handle.
Implementations§
Source§impl RetainedInput
impl RetainedInput
Sourcepub async fn keep_claim_bytes(&self) -> Result<(), DbError>
pub async fn keep_claim_bytes(&self) -> Result<(), DbError>
Retain the confirmed current claim under its provider observation without downloading bytes already owned by the journal. The caller has settled publication and checked the floor before associating these bytes.
Sourcepub async fn local_bytes(&self, length: u64) -> Result<RetainedBytes, DbError>
pub async fn local_bytes(&self, length: u64) -> Result<RetainedBytes, DbError>
A seekable reader over received bytes, pinned against eviction. It never fetches missing bytes or acquires the application writer. Consumers may use it inside a slot transaction after completing transport and floor checks.
Sourcepub async fn observation(&self) -> Result<Vec<u8>, DbError>
pub async fn observation(&self) -> Result<Vec<u8>, DbError>
The first completed provider observation for this identity, including native metadata whose representation can differ in later listings.
Sourcepub async fn receiving(&self) -> MutexGuard<'_, ()>
pub async fn receiving(&self) -> MutexGuard<'_, ()>
Share an in-flight range across consumers of the same durable observation. The guard spans checking retained ranges, fetching gaps, and committing them.
Sourcepub async fn ranges(
&self,
start: u64,
end: u64,
) -> Result<Vec<RetainedRange>, DbError>
pub async fn ranges( &self, start: u64, end: u64, ) -> Result<Vec<RetainedRange>, DbError>
Cached portions of a requested interval, clipped so memory is bounded by it.
Sourcepub async fn keep_range(
&self,
offset: u64,
bytes: Vec<u8>,
) -> Result<(), DbError>
pub async fn keep_range( &self, offset: u64, bytes: Vec<u8>, ) -> Result<(), DbError>
Commit newly fetched, nonoverlapping bytes. Refilling an evicted range is a new insertion, while retained bytes must be consumed without fetching.
Sourcepub async fn received(&self) -> Result<bool, DbError>
pub async fn received(&self) -> Result<bool, DbError>
Whether a whole response (or all of its bounded ranges) reached checked transport EOF. This records receipt, never content authentication.
Sourcepub async fn retained_length(&self) -> Result<u64, DbError>
pub async fn retained_length(&self) -> Result<u64, DbError>
How many of the object’s bytes are retained: its ranges never overlap, so the object is held whole when this equals its size.
Sourcepub async fn keep_received_range(
&self,
offset: u64,
bytes: Vec<u8>,
complete: bool,
) -> Result<(), DbError>
pub async fn keep_received_range( &self, offset: u64, bytes: Vec<u8>, complete: bool, ) -> Result<(), DbError>
Commit received bytes and, at successful EOF, the transport completion fact in one transaction. Neither fact can survive a failed byte commit.
Sourcepub async fn release_ranges(self) -> Result<(), DbError>
pub async fn release_ranges(self) -> Result<(), DbError>
The complete input has been applied (with reversible inputs committed), or permanently refused. Release its encrypted ranges for explicit eviction; checked metadata, file protection, and the refusal remain durable.
Sourcepub async fn discard(self) -> Result<(), DbError>
pub async fn discard(self) -> Result<(), DbError>
Drop the received bytes, which a second read of the object contradicted, so the next read fetches the object again (§19.1).
Sourcepub async fn files(&self) -> Result<Option<FileEvidence>, DbError>
pub async fn files(&self) -> Result<Option<FileEvidence>, DbError>
The checked file evidence of these bytes, if any (§17.10).
Sourcepub async fn keep_files(&self, files: FileEvidence) -> Result<(), DbError>
pub async fn keep_files(&self, files: FileEvidence) -> Result<(), DbError>
Record references only after complete authentication. Unproven evidence proves no file absent and names what must change before these bytes are checked again.
Trait Implementations§
Source§impl Clone for RetainedInput
impl Clone for RetainedInput
Source§fn clone(&self) -> RetainedInput
fn clone(&self) -> RetainedInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more