pub struct Candidate {
pub id: String,
pub text: String,
pub embedding: Vec<f32>,
pub timestamp: String,
pub source: Option<MemorySource>,
}Expand description
A candidate fact for reranking.
Fields§
§id: StringUnique identifier for the fact.
text: StringDecrypted plaintext of the fact.
embedding: Vec<f32>Embedding vector of the fact.
timestamp: StringTimestamp (passed through to results).
source: Option<MemorySource>Optional Memory Taxonomy v1 provenance source.
If present AND RerankerConfig::apply_source_weights is true, the
candidate’s final score is multiplied by source_weight. Absent
source yields LEGACY_CLAIM_FALLBACK_WEIGHT.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Candidate
impl<'de> Deserialize<'de> for Candidate
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Candidate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Candidate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Candidate
impl Serialize for Candidate
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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