pub struct Neighbor<'t, T: 't> {
pub item: &'t T,
pub dist: u64,
}
Expand description
Wrapper of an item and a distance, returned by Neighbors
.
Fields§
§item: &'t T
The item that this entry concerns.
dist: u64
The distance between item
and the origin passed to VpTree::k_nearest()
.
Trait Implementations§
Source§impl<'t, T: 't> Ord for Neighbor<'t, T>
Returns the comparison of the distances only.
impl<'t, T: 't> Ord for Neighbor<'t, T>
Returns the comparison of the distances only.
Source§impl<'t, T: 't> PartialOrd for Neighbor<'t, T>
Returns the comparison of the distances only.
impl<'t, T: 't> PartialOrd for Neighbor<'t, T>
Returns the comparison of the distances only.
impl<'t, T: 't> Eq for Neighbor<'t, T>
Returns the equality of the distances only.
Auto Trait Implementations§
impl<'t, T> Freeze for Neighbor<'t, T>
impl<'t, T> RefUnwindSafe for Neighbor<'t, T>where
T: RefUnwindSafe,
impl<'t, T> Send for Neighbor<'t, T>where
T: Sync,
impl<'t, T> Sync for Neighbor<'t, T>where
T: Sync,
impl<'t, T> Unpin for Neighbor<'t, T>
impl<'t, T> UnwindSafe for Neighbor<'t, T>where
T: RefUnwindSafe,
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