Skip to main content

RetainedInput

Struct RetainedInput 

Source
pub struct RetainedInput { /* private fields */ }
Expand description

One observed object version. A replacement invalidates the preceding handle.

Implementations§

Source§

impl RetainedInput

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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).

Source

pub async fn files(&self) -> Result<Option<FileEvidence>, DbError>

The checked file evidence of these bytes, if any (§17.10).

Source

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

Source§

fn clone(&self) -> RetainedInput

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,