pub struct SnapshotData {
pub metadata: SnapshotMetadata,
pub config: CollectionConfig,
pub vectors: Vec<VectorRecord>,
}Expand description
Complete snapshot data including metadata and vectors
Fields§
§metadata: SnapshotMetadataSnapshot metadata
config: CollectionConfigCollection configuration
vectors: Vec<VectorRecord>All vectors in the collection
Implementations§
Source§impl SnapshotData
impl SnapshotData
Sourcepub fn new(
collection_name: String,
config: CollectionConfig,
vectors: Vec<VectorRecord>,
) -> Self
pub fn new( collection_name: String, config: CollectionConfig, vectors: Vec<VectorRecord>, ) -> Self
Create a new snapshot data instance
Sourcepub fn vectors_count(&self) -> usize
pub fn vectors_count(&self) -> usize
Get the number of vectors in this snapshot
Sourcepub fn collection_name(&self) -> &str
pub fn collection_name(&self) -> &str
Get the collection name
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for SnapshotData
impl<'__de, __Context> BorrowDecode<'__de, __Context> for SnapshotData
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Debug for SnapshotData
impl Debug for SnapshotData
Source§impl<__Context> Decode<__Context> for SnapshotData
impl<__Context> Decode<__Context> for SnapshotData
Source§impl<'de> Deserialize<'de> for SnapshotData
impl<'de> Deserialize<'de> for SnapshotData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for SnapshotData
impl Encode for SnapshotData
Auto Trait Implementations§
impl Freeze for SnapshotData
impl RefUnwindSafe for SnapshotData
impl Send for SnapshotData
impl Sync for SnapshotData
impl Unpin for SnapshotData
impl UnwindSafe for SnapshotData
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