pub struct Candidate {
pub node_id: NodeId,
pub cosine: f32,
pub name: String,
pub namespace: String,
pub trust: String,
}Expand description
A sampled (candidate_id, cosine_to_query, name_for_edit_dist, namespace, trust) tuple. Lifetime-free for testability: a real caller pulls these from the HNSW walk.
Fields§
§node_id: NodeIdStable id of the candidate node.
cosine: f32Cosine similarity of candidate’s embedding to the query.
name: StringSurface-form name of the candidate (for edit-distance signal).
namespace: StringCandidate’s namespace (e.g. “person”, “company”).
trust: StringCandidate’s trust label.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Candidate
impl RefUnwindSafe for Candidate
impl Send for Candidate
impl Sync for Candidate
impl Unpin for Candidate
impl UnsafeUnpin for Candidate
impl UnwindSafe for Candidate
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