pub struct EmbeddingStr(/* private fields */);
Expand description
Replacement of Box<[std::str::str]> for short string embedding
When string size is smaller than std::mem::size_of::<usize>*2-1
,
embed the string content into itself rather than holding the pointer.
Implementations§
Source§impl EmbeddingStr
impl EmbeddingStr
Trait Implementations§
Source§impl Debug for EmbeddingStr
impl Debug for EmbeddingStr
Source§impl Display for EmbeddingStr
impl Display for EmbeddingStr
Source§impl Drop for EmbeddingStr
impl Drop for EmbeddingStr
Source§impl From<&'static str> for EmbeddingStr
impl From<&'static str> for EmbeddingStr
Auto Trait Implementations§
impl Freeze for EmbeddingStr
impl RefUnwindSafe for EmbeddingStr
impl Send for EmbeddingStr
impl Sync for EmbeddingStr
impl Unpin for EmbeddingStr
impl UnwindSafe for EmbeddingStr
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