pub enum ConfigError {
InvalidConfidence(f64),
DepthTooHigh(usize),
InvalidMlWeight(f64),
InvalidBpeBound(f64),
NonFiniteEntropyThreshold(f64),
InvalidEntropyThreshold(f64),
Parse(String),
}Expand description
Errors returned while validating a scan configuration.
Variants§
InvalidConfidence(f64)
min_confidence was outside the closed unit interval [0.0, 1.0].
DepthTooHigh(usize)
max_decode_depth exceeded the safety ceiling
[MAX_DECODE_DEPTH_LIMIT].
InvalidMlWeight(f64)
ml_weight was outside the closed unit interval [0.0, 1.0]. The score
blend multiplies by this weight; a value above 1.0 over-weights the model
and a negative one inverts it (both silently distort every confidence).
InvalidBpeBound(f64)
entropy_bpe_max_bytes_per_token was not a finite value strictly greater
than zero. A 0.0 (or negative / NaN) bound treats EVERY candidate as
word-like and suppresses the entire entropy/generic surface, a silent
recall wipeout (the #[serde(default)] guards only configs that OMIT the
key, not an explicit out-of-range value).
NonFiniteEntropyThreshold(f64)
entropy_threshold was not finite. A NaN threshold makes every
entropy >= threshold comparison false, silently suppressing every
entropy candidate; ±inf is equally nonsensical as a bits-per-byte floor.
InvalidEntropyThreshold(f64)
entropy_threshold exceeded the mathematical byte-entropy range.
Parse(String)
The TOML text could not be deserialized into a ScanConfig (syntax
error, wrong type, or an unknown field, the struct is
#[serde(deny_unknown_fields)]). The inner string is the toml crate’s
diagnostic, kept as a String so the public error type does not leak the
toml version into the API.
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
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 ConfigError
impl RefUnwindSafe for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl UnsafeUnpin for ConfigError
impl UnwindSafe for ConfigError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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