pub enum SketchError {
InvalidConfig(String),
Deserialization(String),
Cpp(String),
EmptyIntersection,
}Expand description
Error type shared across all sketch families (HLL, Theta, CPC) in this crate — there is no per-family error type.
Variants§
InvalidConfig(String)
A builder or constructor was given an out-of-range configuration
value (e.g. lg_k/lg_config_k outside its valid bounds, or a
num_std_dev outside 1..=3). The underlying C++ layer rejected the
value; the string is its exception message.
Deserialization(String)
deserialize/deserialize_compressed/wrap was given bytes that
don’t parse as a valid serialized sketch (e.g. truncated, corrupt,
or produced by an incompatible seed).
Cpp(String)
A catch-all for any other C++ exception that crossed the FFI
boundary, carrying its what() message. Prefer matching on a more
specific variant above when one applies.
EmptyIntersection
ThetaIntersection::get_result() was called before any update().
Trait Implementations§
Source§impl Debug for SketchError
impl Debug for SketchError
Source§impl Display for SketchError
impl Display for SketchError
Source§impl Error for SketchError
impl Error for SketchError
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()