use super::{CandidateBackend, SemanticLinkReport};
impl CandidateBackend {
#[must_use]
pub const fn as_str(self) -> &'static str {
match self {
Self::Exact => "exact",
Self::WeavatrixVector => "weavatrix_search_vector",
}
}
#[must_use]
pub const fn is_exact(self) -> bool {
matches!(self, Self::Exact)
}
}
impl SemanticLinkReport {
#[must_use]
pub const fn vector_count(&self) -> usize {
self.vector_count
}
#[must_use]
pub const fn dimension(&self) -> usize {
self.dimension
}
#[must_use]
pub const fn comparisons(&self) -> u64 {
self.comparisons
}
#[must_use]
pub const fn pair_count(&self) -> usize {
self.pair_count
}
#[must_use]
pub const fn candidate_backend(&self) -> CandidateBackend {
self.candidate_backend
}
#[must_use]
pub fn policy_id(&self) -> &str {
&self.policy_id
}
#[must_use]
pub const fn edge_count(&self) -> usize {
self.edges.len()
}
#[must_use]
pub fn edges(&self) -> &[weavatrix_graph::Edge] {
&self.edges
}
#[must_use]
pub fn into_edges(self) -> Vec<weavatrix_graph::Edge> {
self.edges
}
}