pub struct RecallItem {
pub memory_id: i64,
pub name: String,
pub namespace: String,
pub memory_type: String,
pub description: String,
pub snippet: String,
pub distance: f32,
pub source: String,
}Expand description
Item individual retornado pela consulta recall.
O campo memory_type é serializado como "type" no JSON para manter
compatibilidade com clientes externos — o nome Rust usa memory_type
para evitar conflito com a palavra reservada.
§Examples
use sqlite_graphrag::output::RecallItem;
let item = RecallItem {
memory_id: 7,
name: "nota-rust".into(),
namespace: "global".into(),
memory_type: "user".into(),
description: "aprendizado de Rust".into(),
snippet: "ownership e borrowing".into(),
distance: 0.12,
source: "direct".into(),
};
let json = serde_json::to_string(&item).unwrap();
// Campo Rust `memory_type` aparece como `"type"` no JSON.
assert!(json.contains("\"type\":\"user\""));
assert!(!json.contains("memory_type"));
assert!(json.contains("\"distance\":0.12"));Fields§
§memory_id: i64§name: String§namespace: String§memory_type: String§description: String§snippet: String§distance: f32§source: StringTrait Implementations§
Source§impl Clone for RecallItem
impl Clone for RecallItem
Source§fn clone(&self) -> RecallItem
fn clone(&self) -> RecallItem
Returns a duplicate of the value. Read more
1.0.0 · 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 RecallItem
impl RefUnwindSafe for RecallItem
impl Send for RecallItem
impl Sync for RecallItem
impl Unpin for RecallItem
impl UnsafeUnpin for RecallItem
impl UnwindSafe for RecallItem
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 more