pub struct EmbeddingModelId {
pub name: String,
pub revision: u32,
}Expand description
Stable identifier for one row in the embedding_model table.
The revision is a monotonic integer minted by the server on registration; it intentionally does NOT mirror upstream model versions (which are semver and can be re-released) — revisions are stable within our corpus.
Fields§
§name: StringThe model’s canonical name as published by its provider (e.g. bge-base-en-v1.5).
revision: u32Monotonic per-name revision. Always >= 1.
Implementations§
Source§impl EmbeddingModelId
impl EmbeddingModelId
Sourcepub fn new(
name: impl Into<String>,
revision: u32,
) -> Result<Self, ParseEmbeddingModelIdError>
pub fn new( name: impl Into<String>, revision: u32, ) -> Result<Self, ParseEmbeddingModelIdError>
Construct an id without going through the string form.
§Errors
Returns ParseEmbeddingModelIdError::EmptyName if name is empty,
ParseEmbeddingModelIdError::NameContainsAt if name contains @,
or ParseEmbeddingModelIdError::InvalidRevision if revision == 0.
Trait Implementations§
Source§impl Clone for EmbeddingModelId
impl Clone for EmbeddingModelId
Source§fn clone(&self) -> EmbeddingModelId
fn clone(&self) -> EmbeddingModelId
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 EmbeddingModelId
impl Debug for EmbeddingModelId
Source§impl<'de> Deserialize<'de> for EmbeddingModelId
impl<'de> Deserialize<'de> for EmbeddingModelId
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for EmbeddingModelId
impl Display for EmbeddingModelId
impl Eq for EmbeddingModelId
Source§impl FromStr for EmbeddingModelId
impl FromStr for EmbeddingModelId
Source§impl Hash for EmbeddingModelId
impl Hash for EmbeddingModelId
Source§impl PartialEq for EmbeddingModelId
impl PartialEq for EmbeddingModelId
Source§fn eq(&self, other: &EmbeddingModelId) -> bool
fn eq(&self, other: &EmbeddingModelId) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EmbeddingModelId
impl Serialize for EmbeddingModelId
impl StructuralPartialEq for EmbeddingModelId
Auto Trait Implementations§
impl Freeze for EmbeddingModelId
impl RefUnwindSafe for EmbeddingModelId
impl Send for EmbeddingModelId
impl Sync for EmbeddingModelId
impl Unpin for EmbeddingModelId
impl UnsafeUnpin for EmbeddingModelId
impl UnwindSafe for EmbeddingModelId
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.