Skip to main content

CoreError

Enum CoreError 

Source
#[non_exhaustive]
pub enum CoreError {
Show 13 variants StringTooLong { got: usize, max: u32, }, ConstructedValueTooLarge { got: usize, max: u32, }, DecimalPrecisionExceeded { got: u32, max: u32, }, VectorEmpty, VectorTooLarge { got: usize, max: usize, }, VectorComponentNotFinite { index: usize, value: f32, }, VectorDimensionMismatch { lhs: usize, rhs: usize, }, VectorZeroNorm { side: &'static str, }, ZeroIdentifier, CompactKeyValueLengthMismatch { keys: usize, values: usize, }, OverlappingDiff { kind: &'static str, key: DbString, }, JsonParse { message: String, }, JsonPatch { message: String, },
}
Expand description

Error type for foundation data-model operations.

Codes in the 0Gxxx range are selene-db implementation-defined conditions reserved for engine-internal validation and registry failures.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

StringTooLong

A string or byte-string exceeded the implementation-defined length.

Fields

§got: usize

Observed byte length.

§max: u32

Maximum byte length.

§

ConstructedValueTooLarge

A list or record exceeded the implementation-defined cardinality.

Fields

§got: usize

Observed element count.

§max: u32

Maximum element count.

§

DecimalPrecisionExceeded

A decimal exceeded the implementation-defined significant-digit precision.

Fields

§got: u32

Observed significant-digit count.

§max: u32

Maximum significant-digit count.

§

VectorEmpty

A native dense vector was constructed without components.

§

VectorTooLarge

A native dense vector exceeded the implementation-defined dimension cap.

Fields

§got: usize

Observed component count.

§max: usize

Maximum component count.

§

VectorComponentNotFinite

A native dense vector component was NaN or infinite.

Fields

§index: usize

Zero-based component index.

§value: f32

Rejected component value.

§

VectorDimensionMismatch

Two native dense vectors had incompatible dimensions for metric work.

Fields

§lhs: usize

Left-hand vector dimension.

§rhs: usize

Right-hand vector dimension.

§

VectorZeroNorm

A cosine-distance vector had zero magnitude.

Fields

§side: &'static str

Which side of the comparison was zero magnitude.

§

ZeroIdentifier

Identifier value zero is reserved as the tombstone sentinel.

§

CompactKeyValueLengthMismatch

Compact PropertyMap was constructed with mismatched key and value counts.

Fields

§keys: usize

Number of keys supplied.

§values: usize

Number of value slots supplied.

§

OverlappingDiff

A label diff or property diff named the same key in both add/set and remove.

Fields

§kind: &'static str

"label" or "property".

§key: DbString

The contradicting key.

§

JsonParse

JSON text could not be parsed.

Fields

§message: String

Parser diagnostic.

§

JsonPatch

A JSON Patch document or operation is invalid.

Fields

§message: String

Patch diagnostic.

Implementations§

Source§

impl CoreError

Source

pub const fn gqlstatus(&self) -> &'static str

Map this error to its 5-character ISO GQLSTATUS code.

ISO/IEC 39075:2024 clause 23 defines the status-code shape. Spec 02 section 3.1 binds the value-limit and numeric-limit choices used here.

Trait Implementations§

Source§

impl Debug for CoreError

Source§

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

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

impl Diagnostic for CoreError

Source§

fn code(&self) -> Option<Box<dyn Display + '_>>

Unique diagnostic code that can be used to look up more information about this Diagnostic. Ideally also globally unique, and documented in the toplevel crate’s documentation for easy searching. Rust path format (foo::bar::baz) is recommended, but more classic codes like E0123 or enums will work just fine.
Source§

fn severity(&self) -> Option<Severity>

Diagnostic severity. This may be used by ReportHandlers to change the display format of this diagnostic. Read more
Source§

fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>

Additional help text related to this Diagnostic. Do you have any advice for the poor soul who’s just run into this issue?
Source§

fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a>>

URL to visit for a more detailed explanation/help about this Diagnostic.
Source§

fn source_code(&self) -> Option<&dyn SourceCode>

Source code to apply this Diagnostic’s Diagnostic::labels to.
Source§

fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>

Labels to apply to this Diagnostic’s Diagnostic::source_code
Source§

fn related<'a>( &'a self, ) -> Option<Box<dyn Iterator<Item = &'a dyn Diagnostic> + 'a>>

Additional related Diagnostics.
Source§

fn diagnostic_source(&self) -> Option<&dyn Diagnostic>

The cause of the error.
Source§

impl Display for CoreError

Source§

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

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

impl Error for CoreError

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§

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

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
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.