pub struct EmbeddingQueue { /* private fields */ }Expand description
Handle to the bounded MPSC channel feeding the embedding worker.
Implementations§
Source§impl EmbeddingQueue
impl EmbeddingQueue
Sourcepub fn start(
capacity: usize,
backlog: Arc<AtomicUsize>,
system: Arc<ConversationMemorySystem>,
) -> Self
pub fn start( capacity: usize, backlog: Arc<AtomicUsize>, system: Arc<ConversationMemorySystem>, ) -> Self
Spawn the embedding worker on the current Tokio runtime and return the sending handle.
system gives the worker access to the canonical
ConversationMemorySystem::vectorize_latest_update_now helper.
When the embeddings feature is disabled the worker still runs
but reports each item as a no-op so callers see deterministic
backlog drain regardless of build features.
Sourcepub fn submit(&self, item: EmbeddingWorkItem) -> Result<(), PipelineError>
pub fn submit(&self, item: EmbeddingWorkItem) -> Result<(), PipelineError>
Non-blocking submit; returns Backpressure if the queue is full.
Auto Trait Implementations§
impl Freeze for EmbeddingQueue
impl RefUnwindSafe for EmbeddingQueue
impl Send for EmbeddingQueue
impl Sync for EmbeddingQueue
impl Unpin for EmbeddingQueue
impl UnsafeUnpin for EmbeddingQueue
impl UnwindSafe for EmbeddingQueue
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> 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::RequestSource§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