pub struct DeterministicEmbedder { /* private fields */ }Expand description
A deterministic reference embedder — no real inference, no model weights. It maps
(asset_id, canonical_version) to a stable L2-normalized vector, so:
- the same asset re-embeds identically within a version (idempotent inserts);
- a version bump yields a different vector — a genuine re-embed, not a copy of the old one;
- a query is reproduced by embedding the same key, giving an exact match.
It stands in for the on-device model runner the way
ReferenceAuthority stands in for live MLS
state: enough to exercise the regeneration orchestration end-to-end and deterministically.
Implementations§
Source§impl DeterministicEmbedder
impl DeterministicEmbedder
Sourcepub fn new(platform: impl Into<String>) -> Self
pub fn new(platform: impl Into<String>) -> Self
A reference embedder for platform producing the current canonical inventory.
Sourcepub fn with_registry(platform: impl Into<String>, registry: Registry) -> Self
pub fn with_registry(platform: impl Into<String>, registry: Registry) -> Self
A reference embedder pinned to a specific registry — use a version-bumped registry to
model the post-swap model that produces the new canonical version.
Trait Implementations§
Source§impl Clone for DeterministicEmbedder
impl Clone for DeterministicEmbedder
Source§fn clone(&self) -> DeterministicEmbedder
fn clone(&self) -> DeterministicEmbedder
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 moreSource§impl Debug for DeterministicEmbedder
impl Debug for DeterministicEmbedder
Source§impl Embedder for DeterministicEmbedder
impl Embedder for DeterministicEmbedder
Source§fn model(&self, task: TaskKind) -> Option<(ModelId, ModelVersion)>
fn model(&self, task: TaskKind) -> Option<(ModelId, ModelVersion)>
The
(model_id, model_version) this embedder produces for task, or None if it does not
serve that task (e.g. a non-embedding task). The loop refuses an embedder whose declared
pair is not the registry canonical — its outputs would otherwise be stored under a tuple
they did not produce.Auto Trait Implementations§
impl Freeze for DeterministicEmbedder
impl RefUnwindSafe for DeterministicEmbedder
impl Send for DeterministicEmbedder
impl Sync for DeterministicEmbedder
impl Unpin for DeterministicEmbedder
impl UnsafeUnpin for DeterministicEmbedder
impl UnwindSafe for DeterministicEmbedder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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