pub enum EcpError {
InvalidInput(String),
NotFound(String),
Store(String),
Corrupt(String),
Usage(String),
UnsupportedVersion(String),
}Expand description
Why an ecp-core call failed. Each variant maps to one Python exception in ecp-py.
Variants§
InvalidInput(String)
A bad argument, or bad data in the user’s file: a dimension mismatch,
an unsupported dtype or file format, an unknown metric name,
levels = 0, a dimension too wide for one chunk, or ids and
embeddings of different lengths. Maps to Python’s ValueError.
NotFound(String)
The embeddings file or the index directory is not there. Maps to
Python’s FileNotFoundError.
Store(String)
The store failed to read, write or erase: permissions, a full disk, a
truncated chunk. Maps to Python’s OSError.
Corrupt(String)
The index is readable but inconsistent: a missing info field, a node
with embeddings but no ids, an unparsable saved query. Maps to
Python’s RuntimeError.
Usage(String)
The API was called in the wrong order, such as build before
select_representatives. Maps to Python’s RuntimeError.
UnsupportedVersion(String)
The index has a format version this build does not read, such as one
written by a newer ecpfs. Maps to Python’s ValueError.
Trait Implementations§
Source§impl Error for EcpError
impl Error for EcpError
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()
Auto Trait Implementations§
impl Freeze for EcpError
impl RefUnwindSafe for EcpError
impl Send for EcpError
impl Sync for EcpError
impl Unpin for EcpError
impl UnsafeUnpin for EcpError
impl UnwindSafe for EcpError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more