pub struct MemoryNeighbor {
pub id: String,
pub similarity: f32,
}Expand description
Edge from one memory to a similar neighbor.
Fields§
§id: StringNeighbor memory ID.
similarity: f32Cosine similarity in 0.0..=1.0.
Trait Implementations§
Source§impl Clone for MemoryNeighbor
impl Clone for MemoryNeighbor
Source§fn clone(&self) -> MemoryNeighbor
fn clone(&self) -> MemoryNeighbor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MemoryNeighbor
impl Debug for MemoryNeighbor
Source§impl<'de> Deserialize<'de> for MemoryNeighbor
impl<'de> Deserialize<'de> for MemoryNeighbor
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 PartialEq for MemoryNeighbor
impl PartialEq for MemoryNeighbor
Source§fn eq(&self, other: &MemoryNeighbor) -> bool
fn eq(&self, other: &MemoryNeighbor) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MemoryNeighbor
impl Serialize for MemoryNeighbor
impl StructuralPartialEq for MemoryNeighbor
Auto Trait Implementations§
impl Freeze for MemoryNeighbor
impl RefUnwindSafe for MemoryNeighbor
impl Send for MemoryNeighbor
impl Sync for MemoryNeighbor
impl Unpin for MemoryNeighbor
impl UnsafeUnpin for MemoryNeighbor
impl UnwindSafe for MemoryNeighbor
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