Skip to main content

save

Function save 

Source
pub fn save(index: &Index, path: &Path) -> Result<()>
Expand description

Write index to path, creating or truncating the file as needed.

§Errors

Returns PlaidError::Io for any underlying I/O failure, or PlaidError::InvalidIndex if an encoded token’s codes buffer doesn’t match the codec’s advertised packed length (a caller bug worth flagging loudly on write rather than producing a file that would fail to load back).