#[non_exhaustive]pub enum SemanticError {
Show 40 variants
EmptyModel,
ModelHasSurroundingWhitespace,
InvalidSimilarityThreshold,
ZeroTopK,
ZeroMaxVectors,
EmptyVector {
node: String,
},
NonFiniteVectorValue {
node: String,
index: usize,
},
ZeroVector {
node: String,
},
TooManyVectors {
count: usize,
maximum: usize,
},
DuplicateNode {
node: String,
},
MissingGraphNode {
node: String,
},
DimensionMismatch {
node: String,
expected: usize,
actual: usize,
},
NumericOverflow,
AllocationFailed,
ZeroCandidatePoolMultiplier,
CandidateKeyOutOfRange {
key: u64,
vector_count: usize,
},
EmptySeoSite {
node: String,
},
SeoSiteHasSurroundingWhitespace {
node: String,
},
EmptySeoCanonical {
node: String,
},
SeoCanonicalHasSurroundingWhitespace {
node: String,
},
EmptySeoLanguage {
node: String,
},
SeoLanguageHasSurroundingWhitespace {
node: String,
},
DuplicateSeoProfile {
node: String,
},
MissingSeoProfile {
node: String,
},
SeoProfileMissingGraphNode {
node: String,
},
EmptyAnchorModel,
AnchorModelHasSurroundingWhitespace,
InvalidAnchorSimilarityThreshold,
ZeroAnchorSuggestions,
EmptyAnchorLocator {
source: String,
},
EmptyAnchorText {
source: String,
locator: String,
},
EmptyAnchorContext {
source: String,
locator: String,
},
AnchorTextOutsideContext {
source: String,
locator: String,
},
AnchorTextHasSurroundingWhitespace {
source: String,
locator: String,
field: &'static str,
},
DuplicateAnchorCandidate {
source: String,
locator: String,
},
MissingAnchorTargetVector {
target: String,
},
AnchorDimensionMismatch {
source: String,
locator: String,
expected: usize,
actual: usize,
},
AnchorModelMismatch {
expected: String,
actual: String,
},
MissingSemanticEdgeAttribute {
attribute: &'static str,
},
Graph(GraphError),
}Expand description
Validation and graph-integration failures.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyModel
The model identifier is empty.
ModelHasSurroundingWhitespace
The model identifier has leading or trailing whitespace.
InvalidSimilarityThreshold
The cosine threshold is non-finite or outside [0, 1].
ZeroTopK
Top-K must be positive.
ZeroMaxVectors
The configured vector limit must be positive.
EmptyVector
A vector has no dimensions.
NonFiniteVectorValue
A vector contains NaN or infinity.
ZeroVector
A vector has no direction and cannot be compared with cosine similarity.
TooManyVectors
More vectors were supplied than the caller-configured safety bound.
DuplicateNode
Two vectors target the same graph node.
MissingGraphNode
A vector targets a node absent from the input graph.
DimensionMismatch
Vectors from the same model have inconsistent dimensions.
NumericOverflow
A platform-sized counter could not be represented in graph metadata.
AllocationFailed
Semantic candidate or report storage could not be reserved.
ZeroCandidatePoolMultiplier
The vector candidate-pool multiplier must be positive.
CandidateKeyOutOfRange
A candidate engine returned a key outside the current semantic input.
EmptySeoSite
An SEO site identifier is empty.
SeoSiteHasSurroundingWhitespace
An SEO site identifier has leading or trailing whitespace.
EmptySeoCanonical
An SEO canonical identifier is empty.
SeoCanonicalHasSurroundingWhitespace
An SEO canonical identifier has leading or trailing whitespace.
EmptySeoLanguage
An SEO language identifier is empty.
SeoLanguageHasSurroundingWhitespace
An SEO language identifier has leading or trailing whitespace.
DuplicateSeoProfile
More than one SEO profile targets the same graph node.
MissingSeoProfile
A semantic vector has no corresponding SEO profile.
SeoProfileMissingGraphNode
An SEO profile targets a node absent from the graph.
EmptyAnchorModel
The anchor matcher model identifier is empty.
AnchorModelHasSurroundingWhitespace
The anchor matcher model identifier has surrounding whitespace.
InvalidAnchorSimilarityThreshold
The anchor similarity threshold is non-finite or outside [0, 1].
ZeroAnchorSuggestions
At least one anchor suggestion per link must be requested.
EmptyAnchorLocator
A candidate anchor locator is empty.
EmptyAnchorText
Candidate anchor text is empty.
EmptyAnchorContext
Candidate anchor context is empty.
AnchorTextOutsideContext
Candidate anchor text is not present in its supplied source context.
AnchorTextHasSurroundingWhitespace
Candidate anchor text metadata has surrounding whitespace.
DuplicateAnchorCandidate
More than one candidate uses the same source and locator.
MissingAnchorTargetVector
A semantic link target has no page vector for anchor matching.
AnchorDimensionMismatch
A candidate anchor vector does not match the target-vector dimension.
AnchorModelMismatch
A semantic edge was produced by another embedding model.
MissingSemanticEdgeAttribute
A semantic edge is missing an attribute required for anchor matching.
Graph(GraphError)
The underlying graph rejected a kind, identifier, provenance, or edge.
Trait Implementations§
Source§impl Debug for SemanticError
impl Debug for SemanticError
Source§impl Display for SemanticError
impl Display for SemanticError
Source§impl Error for SemanticError
impl Error for SemanticError
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()