From 349582b5b1b9a2c8c0564737e0b6916ec411fff4 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 16 Mar 2021 15:31:27 +0100 Subject: [PATCH] Add helper method for bindings --- instant-distance/src/lib.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/instant-distance/src/lib.rs b/instant-distance/src/lib.rs index 6daf4a6..9961c13 100644 --- a/instant-distance/src/lib.rs +++ b/instant-distance/src/lib.rs @@ -77,6 +77,19 @@ impl Builder { pub fn build(self, points: &[P]) -> (Hnsw

, Vec) { Hnsw::new(points, self) } + + #[doc(hidden)] + pub fn into_parts(self) -> (usize, usize, f32, u64) { + let Self { + ef_search, + ef_construction, + heuristic: _, + ml, + seed, + .. + } = self; + (ef_search, ef_construction, ml, seed) + } } impl Default for Builder {