pub struct Bm25IndexRequest {
pub palace: String,
pub drawer_id: String,
pub content: String,
pub data_dir: PathBuf,
}Expand description
One pending BM25 index op enqueued by memory_remember / memory_note
for the per-AppState indexer worker to drain (issue #231).
Why: replacing the per-write tokio::spawn with a single long-lived
worker task requires a self-contained “do this index call” payload that
can travel through an mpsc channel without borrowing from AppState.
Capturing the palace, drawer id, and content here lets the worker
reconstruct the call without re-reading any state.
What: a plain owned-data struct. Clone is not derived — the worker
consumes each request exactly once.
Test: exercised end-to-end by bm25_index_queue_drops_when_full and
the integration tests in trusty-bm25-daemon/tests/.
Fields§
§palace: StringPalace id whose daemon should index the drawer.
drawer_id: StringDrawer id (stringified) — the daemon uses this as the BM25 doc id.
content: StringDrawer text content to index.
data_dir: PathBufOn-disk data directory for the palace’s BM25 daemon — passed to the
spawn supervisor’s ensure_running so the daemon writes its snapshot
next to the rest of the palace’s data.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bm25IndexRequest
impl RefUnwindSafe for Bm25IndexRequest
impl Send for Bm25IndexRequest
impl Sync for Bm25IndexRequest
impl Unpin for Bm25IndexRequest
impl UnsafeUnpin for Bm25IndexRequest
impl UnwindSafe for Bm25IndexRequest
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
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>
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>
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