pub struct ModelRow {
pub task: TaskKind,
pub model_id: ModelId,
pub canonical_version: ModelVersion,
pub output: TaskOutput,
pub display_name: &'static str,
pub function: &'static str,
pub fallback: Option<&'static str>,
}Expand description
One inventory row: the canonical model for a TaskKind — a v1-committed slot from
AI/ML — Pipeline Slots, carrying the model, its function, and its named fallback.
Fields§
§task: TaskKindThe task this row serves.
model_id: ModelIdThe canonical model id (unique across the whole inventory).
canonical_version: ModelVersionThe current canonical version. A swap bumps this and flags prior entries stale.
output: TaskOutputWhat the model produces.
display_name: &'static strHuman-readable label (logging / demo only).
function: &'static strThe slot’s function — the contract’s Function column for this row.
fallback: Option<&'static str>The named fallback model the contract keeps for this slot if the canonical choice proves
insufficient in field testing (None where the contract names none). Not a second live
model: swapping to it is a version bump like any other.
Implementations§
Source§impl ModelRow
impl ModelRow
Sourcepub fn embedding_spec(&self) -> Option<(EmbeddingDim, DistanceMetric)>
pub fn embedding_spec(&self) -> Option<(EmbeddingDim, DistanceMetric)>
The embedding (dim, metric) if this row produces stored embeddings.
Sourcepub fn embedding_format(&self) -> String
pub fn embedding_format(&self) -> String
The derivative format string for this model’s embeddings, e.g. embedding/mobileclip-b
— the value carried in DerivativeCore::format.
Trait Implementations§
impl Eq for ModelRow
impl StructuralPartialEq for ModelRow
Auto Trait Implementations§
impl Freeze for ModelRow
impl RefUnwindSafe for ModelRow
impl Send for ModelRow
impl Sync for ModelRow
impl Unpin for ModelRow
impl UnsafeUnpin for ModelRow
impl UnwindSafe for ModelRow
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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>
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