pub fn read_blob<S: ObjectSource + ?Sized>(
store: &S,
hash: &Hash,
) -> WorktreeResult<Vec<u8>>Expand description
Reassemble the full byte content of a Blob or ChunkedBlob object
addressed by hash.
A plain Blob returns its bytes directly. A
ChunkedBlob manifest is reassembled
by concatenating each referenced chunk (every chunk must itself be a
Blob). This is the shared counterpart to store_file_object and
backs mkit cat, mkit diff, conflict rendering, and blame so they
all reconstruct large-file content the same way.
§Errors
WorktreeError::Storeifhashor any chunk is missing.WorktreeError::Ioifhash(or a chunk) resolves to an object that is neither aBlobnor aChunkedBlobofBlobs.WorktreeError::Objectif the concatenated chunks do not total the manifest’stotal_size(SPEC-OBJECTS §7).