pub struct SharedEmbedder(/* private fields */);Expand description
One embedder handed to several databases.
crate::DatabaseBuilder::embedder takes ownership, which is right for one
database and wrong for a workspace: a hundred chats do not want a hundred
HTTP clients pointed at the same endpoint. Each database gets its own
SharedEmbedder over one shared provider instead.
Calls serialize on the inner mutex. That is not a compromise — the provider behind it is a single service, and the host already serializes embedding within a database. What matters is that the wait happens outside the engine lock, which is still true: the database embeds before it takes its own lock.
Implementations§
Trait Implementations§
Source§fn clone(&self) -> SharedEmbedder
fn clone(&self) -> SharedEmbedder
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§
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