pub enum SearchError {
EmptyDataset,
NoFeatures,
UnpreparedDataset,
InvalidParameter {
name: &'static str,
reason: String,
},
Data(DatasetError),
Tree(TreeError),
}Expand description
A fit that could not start.
Variants§
EmptyDataset
The dataset has no instances.
NoFeatures
The dataset has no feature columns.
UnpreparedDataset
sort_features and compute_unique_feature_values have not both run.
The search compares unique-value indices, so an unprepared dataset
would silently produce a single leaf. Build
datasets through Dataset::from_rows
or DataReader, which both
prepare them.
InvalidParameter
A parameter whose value cannot produce a meaningful search.
Data(DatasetError)
The dataset itself is malformed.
Tree(TreeError)
The search produced a tree that does not hold the tree invariant. This is a bug in the crate, not in the caller’s input.
Trait Implementations§
Source§impl Clone for SearchError
impl Clone for SearchError
Source§fn clone(&self) -> SearchError
fn clone(&self) -> SearchError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SearchError
impl Debug for SearchError
Source§impl Display for SearchError
impl Display for SearchError
impl Eq for SearchError
Source§impl Error for SearchError
impl Error for SearchError
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<DatasetError> for SearchError
impl From<DatasetError> for SearchError
Source§fn from(err: DatasetError) -> Self
fn from(err: DatasetError) -> Self
Converts to this type from the input type.
Source§impl From<TreeError> for SearchError
impl From<TreeError> for SearchError
Source§impl PartialEq for SearchError
impl PartialEq for SearchError
Source§fn eq(&self, other: &SearchError) -> bool
fn eq(&self, other: &SearchError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SearchError
Auto Trait Implementations§
impl Freeze for SearchError
impl RefUnwindSafe for SearchError
impl Send for SearchError
impl Sync for SearchError
impl Unpin for SearchError
impl UnsafeUnpin for SearchError
impl UnwindSafe for SearchError
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