pub trait IndexedFull: IndexedIds {
// Required method
fn get_blob_or_insert_with(
&self,
id: &BlobId,
with: impl FnOnce() -> RusticResult<Bytes>,
) -> RusticResult<Bytes>;
}Expand description
A repository which is indexed such that all blob information is fully contained in the index.
Required Methods§
Sourcefn get_blob_or_insert_with(
&self,
id: &BlobId,
with: impl FnOnce() -> RusticResult<Bytes>,
) -> RusticResult<Bytes>
fn get_blob_or_insert_with( &self, id: &BlobId, with: impl FnOnce() -> RusticResult<Bytes>, ) -> RusticResult<Bytes>
Get a blob from the internal cache blob or insert it with the given function
§Arguments
id- The [Id] of the blob to getwith- The function which fetches the blob from the repository if it is not contained in the cache
§Errors
- If the blob could not be fetched from the repository.
§Returns
The blob with the given id or the result of the given function if the blob is not contained in the cache and the function is called.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.