pub enum PlaidError {
Tensor(Error),
InvalidCodec(String),
InvalidIndex(String),
Io(Error),
}Expand description
Every failure the PLAID pipeline can surface.
Variants§
Tensor(Error)
Underlying tensor operation failed (allocation, matmul,
transpose, argmin, etc.). Wraps candle_core::Error so
callers can downcast when they care about the specific
cause but still propagate uniformly via ?.
InvalidCodec(String)
A ResidualCodec failed its shape/invariant checks. Raised
from encode_vector, decode_vector, batch_encode_tokens,
and build_index’s validate step. The wrapped String
describes the specific constraint violated (dim == 0, nbits
not in {1,2,4,8}, non-monotonic cutoffs, etc.).
InvalidIndex(String)
An on-disk index file was readable but its contents violated
the expected format (wrong magic bytes, unknown format
version, out-of-range header fields, or a centroid_id above
the advertised k_centroids). Distinct from Io — the file
was reached, it’s just malformed.
Io(Error)
Low-level I/O failure (open/read/write/flush). Wraps
std::io::Error verbatim so callers retain the original
error kind when they need it.
Trait Implementations§
Source§impl Debug for PlaidError
impl Debug for PlaidError
Source§impl Display for PlaidError
impl Display for PlaidError
Source§impl Error for PlaidError
impl Error for PlaidError
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<Error> for PlaidError
impl From<Error> for PlaidError
Auto Trait Implementations§
impl !RefUnwindSafe for PlaidError
impl !UnwindSafe for PlaidError
impl Freeze for PlaidError
impl Send for PlaidError
impl Sync for PlaidError
impl Unpin for PlaidError
impl UnsafeUnpin for PlaidError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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