Skip to main content

ProjectionRefusal

Enum ProjectionRefusal 

Source
pub enum ProjectionRefusal {
    NotADirectory {
        path: PathBuf,
    },
    ContinuationRecordLimit {
        attempted: usize,
        limit: usize,
    },
    ContinuationUnavailable,
}
Expand description

Why one projection of a read refused, while every other projection still answered.

A read fails as a whole only when no projection in it can be trusted: the request’s shape is invalid, the root is closed, or the version it pinned is not the one the index holds. A refusal is narrower. It depends on what one projection found at that version, so the lookup of a path beside a tree page that refused the same path still answers, and a caller never has to prove a path is a directory before it may batch the question.

Variants§

§

NotADirectory

A tree page or roll-up named a retained path that is not a directory.

A lookup of the same path answers Present, so neither three-valued answer fits: Absent claims coverage proves the path missing, and Unknown claims coverage cannot tell, which for a retained path never resolves. It depends on index state: the same projection answers while the path is a directory and refuses once it has become a file, so a path taken from an earlier page can start refusing between reads.

Fields

§path: PathBuf

The normalized path the projection named.

§

ContinuationRecordLimit

A page stopped with rows left, and the record that would resume it exceeds MAX_CONTINUATION_RECORD_BYTES.

The page is refused rather than returned without a way to continue, which would present a truncated page as a finished one. Only very long paths or a very large selection reach it. A refused continued page keeps its continuation, so the caller may retry it with a different page bound.

Fields

§attempted: usize

Structural payload bytes the record would retain.

§limit: usize

Maximum structural payload retained by one record.

§

ContinuationUnavailable

A Continue named a continuation this root issued but no longer retains.

An earlier page consumed it, or the root’s bound on retained continuations evicted it to make room for newer pages. Both depend on what other pages did, not on the request, so a token that worked a moment ago costs only its own projection. Start the page again from its first request. A token from another opened root, or one this root never issued, still fails the whole read with Error::ContinuationUnavailable.

Trait Implementations§

Source§

impl Clone for ProjectionRefusal

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ProjectionRefusal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ProjectionRefusal

Source§

impl PartialEq for ProjectionRefusal

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ProjectionRefusal

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.

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.