Skip to main content

put_scratch

Function put_scratch 

Source
pub fn put_scratch(
    fs: &impl Fs,
    paths: &StorePaths,
    clock: &impl Clock,
    doc_id: &str,
    candidate: NewCandidate<'_>,
) -> Result<CandidateEntry, SessionError>
Expand description

Store a candidate snapshot and append a CandidateEntry to the scratch index.

The .zen bytes in candidate.snapshot are written to the shared object store (content-addressed, idempotent). seq and id are derived from the current index length so callers do not need to track them. Returns the created entry.