pub struct Point {
pub id: u64,
pub vector: Vec<f32>,
pub payload: Option<Value>,
}Expand description
A point in the vector database.
A point consists of:
- A unique identifier
- A vector (embedding)
- Optional payload (metadata)
Fields§
§id: u64Unique identifier for the point.
vector: Vec<f32>The vector embedding.
payload: Option<Value>Optional JSON payload containing metadata.
Implementations§
Source§impl Point
impl Point
Sourcepub fn new(id: u64, vector: Vec<f32>, payload: Option<JsonValue>) -> Self
pub fn new(id: u64, vector: Vec<f32>, payload: Option<JsonValue>) -> Self
Creates a new point with the given ID, vector, and optional payload.
§Arguments
id- Unique identifiervector- Vector embeddingpayload- Optional metadata
Sourcepub fn without_payload(id: u64, vector: Vec<f32>) -> Self
pub fn without_payload(id: u64, vector: Vec<f32>) -> Self
Creates a new point without payload.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Point
impl<'de> Deserialize<'de> for Point
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
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more