#[non_exhaustive]pub enum ObjectError {
WrongKind {
expected: &'static str,
got: String,
},
EmbeddingSizeMismatch {
expected: usize,
got: usize,
},
}Expand description
Errors from crate::objects - Node/Edge/Tree/… validation and decode.
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.
WrongKind
The _kind discriminator on the wire doesn’t match the expected
Rust type. For example, decoding an Edge as a Node.
Fields
EmbeddingSizeMismatch
An crate::objects::Embedding’s vector length does not match
dim × bytes_per_dtype(dtype) (SPEC §4.1).
Trait Implementations§
Source§impl Debug for ObjectError
impl Debug for ObjectError
Source§impl Display for ObjectError
impl Display for ObjectError
Source§impl Error for ObjectError
impl Error for ObjectError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ObjectError> for Error
impl From<ObjectError> for Error
Source§fn from(source: ObjectError) -> Self
fn from(source: ObjectError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ObjectError
impl RefUnwindSafe for ObjectError
impl Send for ObjectError
impl Sync for ObjectError
impl Unpin for ObjectError
impl UnsafeUnpin for ObjectError
impl UnwindSafe for ObjectError
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
Mutably borrows from an owned value. Read more