pub struct VectorIndexes(/* private fields */);Expand description
A table’s vector registrations. Retained collections own controlled ordered-map nodes and share their names, index handles and original allowance with nested captures. Live mutation requires an explicit fallible borrow; a retained collection never converts itself to an uncharged writable map.
Implementations§
Source§impl VectorIndexes
impl VectorIndexes
pub fn live_mut( &mut self, ) -> StorageBackendResult<&mut BTreeMap<FieldName, Box<dyn VectorIndex>>>
pub fn get<Q: Ord + ?Sized>( &self, field: &Q, ) -> Option<&(dyn VectorIndex + 'static)>
pub fn contains_key<Q: Ord + ?Sized>(&self, field: &Q) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> VectorIndexesIter<'_> ⓘ
pub fn keys(&self) -> impl ExactSizeIterator<Item = &FieldName>
pub fn values( &self, ) -> impl ExactSizeIterator<Item = &(dyn VectorIndex + 'static)>
Sourcepub fn capture(
source: &dyn VectorIndexSource,
control: &StorageReadControl,
) -> StorageBackendResult<Self>
pub fn capture( source: &dyn VectorIndexSource, control: &StorageReadControl, ) -> StorageBackendResult<Self>
Snapshot live providers under a caller allowance, or share an already retained collection without copying names, nodes or handles. Nested captures preserve the original provider allowance and cancellation boundary.
Trait Implementations§
Source§impl Default for VectorIndexes
impl Default for VectorIndexes
Source§impl From<BTreeMap<String, Box<dyn VectorIndex>>> for VectorIndexes
impl From<BTreeMap<String, Box<dyn VectorIndex>>> for VectorIndexes
Source§impl<'a> IntoIterator for &'a VectorIndexes
impl<'a> IntoIterator for &'a VectorIndexes
Source§impl VectorIndexSource for VectorIndexes
impl VectorIndexSource for VectorIndexes
fn visit( &self, visitor: &mut dyn FnMut(&str, &dyn VectorIndex) -> StorageBackendResult<()>, ) -> StorageBackendResult<()>
Source§fn retained_collection(&self) -> StorageBackendResult<Option<VectorIndexes>>
fn retained_collection(&self) -> StorageBackendResult<Option<VectorIndexes>>
An immutable collection may share its original allocation owner. Implementations must never capture or clone a live collection here.
Auto Trait Implementations§
impl !RefUnwindSafe for VectorIndexes
impl !UnwindSafe for VectorIndexes
impl Freeze for VectorIndexes
impl Send for VectorIndexes
impl Sync for VectorIndexes
impl Unpin for VectorIndexes
impl UnsafeUnpin for VectorIndexes
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