pub struct EmbeddingName(/* private fields */);Expand description
A name for an embedding space.
Embedding names identify different embedding spaces associated with entities.
For example, an entity might have text_embedding and image_embedding spaces.
Names must be non-empty and contain only alphanumeric characters, underscores, and hyphens.
§Example
use manifoldb_vector::types::EmbeddingName;
let name = EmbeddingName::new("text_embedding").unwrap();
assert_eq!(name.as_str(), "text_embedding");Implementations§
Source§impl EmbeddingName
impl EmbeddingName
Sourcepub fn new(name: impl Into<String>) -> Result<Self, VectorError>
pub fn new(name: impl Into<String>) -> Result<Self, VectorError>
Create a new embedding name.
§Errors
Returns an error if the name is empty or contains invalid characters.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consume the name and return the underlying string.
Trait Implementations§
Source§impl AsRef<str> for EmbeddingName
impl AsRef<str> for EmbeddingName
Source§impl Clone for EmbeddingName
impl Clone for EmbeddingName
Source§fn clone(&self) -> EmbeddingName
fn clone(&self) -> EmbeddingName
Returns a duplicate of the value. Read more
1.0.0 · 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 EmbeddingName
impl Debug for EmbeddingName
Source§impl Display for EmbeddingName
impl Display for EmbeddingName
Source§impl Hash for EmbeddingName
impl Hash for EmbeddingName
Source§impl PartialEq for EmbeddingName
impl PartialEq for EmbeddingName
impl Eq for EmbeddingName
impl StructuralPartialEq for EmbeddingName
Auto Trait Implementations§
impl Freeze for EmbeddingName
impl RefUnwindSafe for EmbeddingName
impl Send for EmbeddingName
impl Sync for EmbeddingName
impl Unpin for EmbeddingName
impl UnwindSafe for EmbeddingName
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