Skip to main content

load_from_file

Function load_from_file 

Source
pub fn load_from_file<Id>(path: &Path) -> Result<FibSidecarIndex<Id>>
where Id: Clone + Eq + Debug + DeserializeOwned,
Expand description

Load a FibSidecarIndex from a binary file (fully owned).

Reads the file, reconstructs the FibScorer from the profile (by rebuilding the quantizer), and decodes each entry’s compact bytes into a FibCodeV1.

The Id type must implement DeserializeOwned (via postcard).

§Errors

Returns FibQuantError::CorruptPayload for malformed files or deserialization failures.