Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 45 variants NotFound(Cid), InvalidNode, InvalidFormat(String), FormatMismatch { expected: Cid, actual: Cid, }, EntryTooLarge { encoded_bytes: u64, limit: u64, }, Deserialize(String), Serialize(String), Store(Box<dyn Error + Send + Sync>), CidMismatch { expected: Cid, actual: Cid, }, Conflict(Conflict), BufferFull, InvalidSavepoint, PatchBaseMismatch, InvalidStructuralPatch(String), UnsortedInput { previous: Vec<u8>, next: Vec<u8>, }, DuplicateCanonicalMutation { key: Vec<u8>, }, CanonicalSpliceConfigMismatch, MissingNamedRoots { names: Vec<Vec<u8>>, }, InvalidSnapshotBundle(String), UnsupportedTransactions { store: &'static str, }, TransactionConflict(Box<TransactionConflict>), InvalidVersionedMap(String), InvalidIndexDefinition { reason: String, }, IndexRuntimeDefinitionMissing { name: Vec<u8>, generation: u64, }, IndexDefinitionMismatch { name: Vec<u8>, persisted: Cid, runtime: Cid, }, IndexesRequireIndexedMap { map_id: Vec<u8>, active_indexes: Vec<Vec<u8>>, }, IndexOperationUnsupported { operation: &'static str, }, IndexExtractionFailed { name: Vec<u8>, primary_key: Vec<u8>, reason: String, }, IndexProjectionMismatch { name: Vec<u8>, mode: IndexProjection, primary_key: Vec<u8>, }, ConflictingIndexProjection { name: Vec<u8>, primary_key: Vec<u8>, term: Vec<u8>, }, IndexBuildConflictLimitExceeded { name: Vec<u8>, attempts: usize, }, IndexUnavailableAtVersion { name: Vec<u8>, source_version: MapVersionId, }, IndexCheckpointMismatch { name: Vec<u8>, source_version: MapVersionId, reason: String, }, IndexCursorVersionMismatch { expected: String, actual: String, }, IndexResourceLimitExceeded { resource: &'static str, limit: usize, actual: usize, }, InvalidIndexedSnapshotBundle { reason: String, }, InvalidProximityConfig { reason: String, }, UnsupportedProximityVersion { found: u8, required: u8, }, InvalidProximityVector { reason: String, }, ZeroCosineVector, DuplicateProximityKey { key: Vec<u8>, }, InvalidProximitySearch { reason: String, }, InvalidProximityObject { kind: &'static str, reason: String, }, ProximityNodeTooLarge { level: u8, entries: usize, encoded_bytes: usize, limit: usize, }, ContentGraphResourceLimitExceeded { resource: &'static str, limit: usize, actual: usize, },
}
Expand description

Prolly tree errors

Variants§

§

NotFound(Cid)

Node not found in store

§

InvalidNode

Invalid node structure

§

InvalidFormat(String)

Persisted tree format parameters are invalid.

§

FormatMismatch

A node was decoded under a different persisted tree format.

Fields

§expected: Cid
§actual: Cid
§

EntryTooLarge

One entry cannot fit below the persisted hard byte limit.

Fields

§encoded_bytes: u64
§limit: u64
§

Deserialize(String)

Deserialization failed

§

Serialize(String)

Serialization failed

§

Store(Box<dyn Error + Send + Sync>)

Storage error

§

CidMismatch

Stored bytes did not hash to the CID they were stored under.

Fields

§expected: Cid
§actual: Cid
§

Conflict(Conflict)

Merge conflict - occurs when both trees modify the same key differently and no resolver is provided or the resolver returns Resolution::Unresolved

§

BufferFull

Mutation buffer is full - adding a mutation would exceed the buffer size limit

§

InvalidSavepoint

A savepoint belongs to another write-session generation.

§

PatchBaseMismatch

A patch does not describe the selected immutable base.

§

InvalidStructuralPatch(String)

A structural patch is malformed or cannot be safely applied.

§

UnsortedInput

Sorted bulk loading received keys out of order.

Fields

§previous: Vec<u8>
§next: Vec<u8>
§

DuplicateCanonicalMutation

Canonical splice received more than one mutation for a logical key.

Fields

§key: Vec<u8>
§

CanonicalSpliceConfigMismatch

Canonical splice manager and immutable tree use different shape settings.

§

MissingNamedRoots

A GC retention policy referenced named roots that were not present.

Fields

§names: Vec<Vec<u8>>
§

InvalidSnapshotBundle(String)

A portable snapshot bundle is malformed or not self-contained.

§

UnsupportedTransactions

The configured store does not support strict atomic transactions.

Fields

§store: &'static str
§

TransactionConflict(Box<TransactionConflict>)

A transaction could not commit because a validated named root changed.

§

InvalidVersionedMap(String)

A built-in versioned-map catalog is missing or internally inconsistent.

§

InvalidIndexDefinition

A runtime secondary-index definition is invalid.

Fields

§reason: String
§

IndexRuntimeDefinitionMissing

Persisted active index semantics have no matching runtime extractor.

Fields

§name: Vec<u8>
§generation: u64
§

IndexDefinitionMismatch

Runtime and persisted descriptor fingerprints disagree.

Fields

§name: Vec<u8>
§persisted: Cid
§runtime: Cid
§

IndexesRequireIndexedMap

A managed source map must be mutated through IndexedMap.

Fields

§map_id: Vec<u8>
§active_indexes: Vec<Vec<u8>>
§

IndexOperationUnsupported

The requested operation has no safe indexed implementation in v1.

Fields

§operation: &'static str
§

IndexExtractionFailed

An application extractor rejected one source record.

Fields

§name: Vec<u8>
§primary_key: Vec<u8>
§reason: String
§

IndexProjectionMismatch

An extractor emission is incompatible with its projection mode.

Fields

§name: Vec<u8>
§primary_key: Vec<u8>
§

ConflictingIndexProjection

One source record emitted different projections for the same term.

Fields

§name: Vec<u8>
§primary_key: Vec<u8>
§term: Vec<u8>
§

IndexBuildConflictLimitExceeded

Repeated source movement prevented index activation.

Fields

§name: Vec<u8>
§attempts: usize
§

IndexUnavailableAtVersion

No exact checkpoint exists for an index at the selected source version.

Fields

§name: Vec<u8>
§source_version: MapVersionId
§

IndexCheckpointMismatch

A persisted checkpoint disagrees with the selected source or index root.

Fields

§name: Vec<u8>
§source_version: MapVersionId
§reason: String
§

IndexCursorVersionMismatch

A cursor belongs to a different immutable indexed snapshot.

Fields

§expected: String
§actual: String
§

IndexResourceLimitExceeded

Index work exceeded a configured resource bound.

Fields

§resource: &'static str
§limit: usize
§actual: usize
§

InvalidIndexedSnapshotBundle

A current indexed-snapshot bundle is malformed or inconsistent.

Fields

§reason: String
§

InvalidProximityConfig

A proximity-map shape configuration is invalid.

Fields

§reason: String
§

UnsupportedProximityVersion

Persisted proximity bytes use a format version this build does not read.

Fields

§found: u8
§required: u8
§

InvalidProximityVector

A vector is incompatible with the proximity-map configuration.

Fields

§reason: String
§

ZeroCosineVector

Cosine distance cannot prepare a vector with zero Euclidean norm.

§

DuplicateProximityKey

A proximity build or mutation contains the same logical key twice.

Fields

§key: Vec<u8>
§

InvalidProximitySearch

Proximity search options are invalid.

Fields

§reason: String
§

InvalidProximityObject

A persisted proximity record, node, or descriptor is malformed.

Fields

§kind: &'static str
§reason: String
§

ProximityNodeTooLarge

One canonical proximity node exceeds the configured hard byte limit.

Fields

§level: u8
§entries: usize
§encoded_bytes: usize
§limit: usize
§

ContentGraphResourceLimitExceeded

A typed content-graph traversal exceeded a configured resource limit.

Fields

§resource: &'static str
§limit: usize
§actual: usize

Trait Implementations§

Source§

impl Debug for Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Error for Error

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.