pub struct RecalledFact {
pub fact: GraphFact,
pub activation_score: Option<f32>,
pub provenance_message_id: Option<MessageId>,
pub provenance_snippet: Option<String>,
pub neighbors: Vec<GraphFact>,
}Expand description
A graph fact returned by the view-aware recall path.
Wraps a base GraphFact and carries optional enrichment fields populated
depending on the RecallView in use.
§Examples
use zeph_memory::{RecalledFact, RecallView};
use zeph_memory::graph::types::GraphFact;
use zeph_memory::graph::EdgeType;
let base = GraphFact {
entity_name: "Rust".to_string(),
relation: "uses".to_string(),
target_name: "LLVM".to_string(),
fact: "Rust uses LLVM for code generation".to_string(),
entity_match_score: 0.9,
hop_distance: 0,
confidence: 0.95,
valid_from: None,
edge_type: EdgeType::Semantic,
retrieval_count: 1,
edge_id: None,
};
let recalled = RecalledFact::from_graph_fact(base);
assert!(recalled.activation_score.is_none());
assert!(recalled.provenance_message_id.is_none());
assert!(recalled.neighbors.is_empty());Fields§
§fact: GraphFactThe base graph fact (text, relation, confidence, edge_type, hop_distance).
activation_score: Option<f32>Spreading-activation score. Some when the SA path was used; None for plain BFS.
Used by the assembler to render (activation: X) suffix and preserve
current output bytes when view = Head.
provenance_message_id: Option<MessageId>Source-message ID for the edge (Zoom-In only).
provenance_snippet: Option<String>≤200-char snippet from the source message, with \n\r<> scrubbed (Zoom-In only).
neighbors: Vec<GraphFact>1-hop neighbor facts deduped against the head set (Zoom-Out only).
Implementations§
Source§impl RecalledFact
impl RecalledFact
Sourcepub fn from_graph_fact(fact: GraphFact) -> Self
pub fn from_graph_fact(fact: GraphFact) -> Self
Wrap a plain GraphFact with no enrichment fields set.
Trait Implementations§
Source§impl Clone for RecalledFact
impl Clone for RecalledFact
Source§fn clone(&self) -> RecalledFact
fn clone(&self) -> RecalledFact
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RecalledFact
impl RefUnwindSafe for RecalledFact
impl Send for RecalledFact
impl Sync for RecalledFact
impl Unpin for RecalledFact
impl UnsafeUnpin for RecalledFact
impl UnwindSafe for RecalledFact
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request