pub enum TreeError {
Empty,
Malformed {
node: usize,
reason: &'static str,
},
FeatureOutOfRange {
node: usize,
feature: usize,
n_features: usize,
},
RaggedInput {
len: usize,
n_features: usize,
},
}Expand description
Why a tree could not be walked or did not hold its invariant.
Variants§
Empty
The tree has no nodes: fit has not run, or it failed.
Malformed
A node breaks the leaf/internal invariant. See Tree::validate.
FeatureOutOfRange
A node tests a feature the instance does not have.
RaggedInput
A batch whose length is not a whole number of rows.
Trait Implementations§
impl Copy for TreeError
impl Eq for TreeError
Source§impl Error for TreeError
impl Error for TreeError
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<TreeError> for SearchError
impl From<TreeError> for SearchError
impl StructuralPartialEq for TreeError
Auto Trait Implementations§
impl Freeze for TreeError
impl RefUnwindSafe for TreeError
impl Send for TreeError
impl Sync for TreeError
impl Unpin for TreeError
impl UnsafeUnpin for TreeError
impl UnwindSafe for TreeError
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