pub enum MarkovError {
EmptyCorpus,
EmptySequence {
index: usize,
},
NoTransitions {
partition: &'static str,
},
InvalidHoldout {
sequences: usize,
held_out: usize,
},
InvalidPolicy {
field: &'static str,
reason: &'static str,
},
UnknownState {
sequence: usize,
position: usize,
},
CountOverflow,
DuplicateStateLabel,
}Expand description
Failure while validating, fitting, scoring, or serializing a Markov model.
Variants§
EmptyCorpus
The corpus contained no sequences.
EmptySequence
One sequence contained no state.
NoTransitions
The requested partition contained no adjacent state pair.
InvalidHoldout
The holdout would leave no training sequence.
InvalidPolicy
Policy or provenance was incomplete or numerically invalid.
UnknownState
A scored state was outside the fitted finite vocabulary.
CountOverflow
A transition count exceeded u64.
DuplicateStateLabel
Two distinct states were given the same stable serialization label.
Trait Implementations§
Source§impl Clone for MarkovError
impl Clone for MarkovError
Source§fn clone(&self) -> MarkovError
fn clone(&self) -> MarkovError
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 MarkovError
impl Debug for MarkovError
Source§impl Display for MarkovError
impl Display for MarkovError
impl Eq for MarkovError
Source§impl Error for MarkovError
impl Error for MarkovError
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 PartialEq for MarkovError
impl PartialEq for MarkovError
impl StructuralPartialEq for MarkovError
Auto Trait Implementations§
impl Freeze for MarkovError
impl RefUnwindSafe for MarkovError
impl Send for MarkovError
impl Sync for MarkovError
impl Unpin for MarkovError
impl UnsafeUnpin for MarkovError
impl UnwindSafe for MarkovError
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