pub enum ArtifactError {
TooShort {
needed: usize,
got: usize,
},
InvalidMagic {
got: [u8; 4],
},
UnsupportedFormatVersion {
found: u32,
supported: u32,
},
ChecksumMismatch,
CorruptPayload {
at: usize,
detail: String,
},
InconsistentVectorWidth {
expected: usize,
got: usize,
},
VectorNotNormalized {
id: String,
},
NonEmptyZeroDim,
InvalidVector {
id: String,
detail: String,
},
IncompatibleMerge {
detail: String,
},
Embedder(EmbedderError),
}Expand description
Failure building or loading a binary embedding artifact.
Variants§
TooShort
File shorter than the format prefix or declared payload length.
InvalidMagic
Magic bytes were not RAT1.
UnsupportedFormatVersion
format_version is newer than this binary supports.
ChecksumMismatch
Payload SHA-256 did not match the checksum in the file prefix.
CorruptPayload
Payload bytes failed structural decode after a valid checksum.
Fields
InconsistentVectorWidth
Embedder returned vectors of mixed widths in one build batch.
Fields
VectorNotNormalized
Embedder returned a vector that is not L2-normalized.
NonEmptyZeroDim
Non-empty artifact declared dim == 0 (invalid embedding space).
InvalidVector
A vector failed semantic checks (non-finite or not unit-normalized).
Raised for embedder output during [build_artifact] and for vectors
decoded from checksum-valid RAT1. Distinct from
Self::VectorNotNormalized, which is the build-time failure for
finite non-unit embedder vectors.
Fields
IncompatibleMerge
Valid artifacts that cannot be combined (header mismatch or duplicate
(kind, id)). Not Self::CorruptPayload: each input may decode alone.
Embedder(EmbedderError)
Underlying embedder failure during [build_artifact].
Trait Implementations§
Source§impl Clone for ArtifactError
impl Clone for ArtifactError
Source§fn clone(&self) -> ArtifactError
fn clone(&self) -> ArtifactError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ArtifactError
impl Debug for ArtifactError
Source§impl Display for ArtifactError
impl Display for ArtifactError
Source§impl Error for ArtifactError
impl Error for ArtifactError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ArtifactError> for WarmError
impl From<ArtifactError> for WarmError
Source§fn from(value: ArtifactError) -> Self
fn from(value: ArtifactError) -> Self
Source§impl From<EmbedderError> for ArtifactError
impl From<EmbedderError> for ArtifactError
Source§fn from(value: EmbedderError) -> Self
fn from(value: EmbedderError) -> Self
Auto Trait Implementations§
impl Freeze for ArtifactError
impl RefUnwindSafe for ArtifactError
impl Send for ArtifactError
impl Sync for ArtifactError
impl Unpin for ArtifactError
impl UnsafeUnpin for ArtifactError
impl UnwindSafe for ArtifactError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more