pub struct ObjectReader<'a, B, N, H> { /* private fields */ }Expand description
Repository prefetch for mkit_core::store::MemorySource and core builders.
Implementations§
Source§impl<B: MultipartBlobStore, N: NamespaceStore + Clone + 'static, H: HookSet> ObjectReader<'_, B, N, H>
impl<B: MultipartBlobStore, N: NamespaceStore + Clone + 'static, H: HookSet> ObjectReader<'_, B, N, H>
Sourcepub async fn read_canonical(
&self,
ids: &[Hash],
) -> Result<Vec<Option<Vec<u8>>>, ServerError>
pub async fn read_canonical( &self, ids: &[Hash], ) -> Result<Vec<Option<Vec<u8>>>, ServerError>
Prefetch canonical bytes; inaccessible IDs are uniformly absent.
§Errors
Oversized batches, invalid authority, exhausted budgets or store failures.
Sourcepub async fn read_canonical_with_limit(
&self,
ids: &[Hash],
max_bytes: u64,
) -> Result<Vec<Option<Vec<u8>>>, ServerError>
pub async fn read_canonical_with_limit( &self, ids: &[Hash], max_bytes: u64, ) -> Result<Vec<Option<Vec<u8>>>, ServerError>
Bound canonical decode work (including ancestors/bases) and output bytes for this call. Duplicate outputs count individually. Inaccessible ids remain absent. Length checks precede requested-object allocation.
§Errors
ResourceExhausted for the caller cap; other errors as read_canonical.
Sourcepub async fn object_metadata(
&self,
ids: &[Hash],
) -> Result<Vec<Option<ObjectMetadata>>, ServerError>
pub async fn object_metadata( &self, ids: &[Hash], ) -> Result<Vec<Option<ObjectMetadata>>, ServerError>
Verified object metadata without fetching requested canonical bytes.
§Errors
Invalid authority, incomplete proof, corrupt facts or storage failure.
Sourcepub async fn object_sizes(
&self,
ids: &[Hash],
) -> Result<Vec<Option<u64>>, ServerError>
👎Deprecated: use object_metadata for kind, canonical_len and logical_len
pub async fn object_sizes( &self, ids: &[Hash], ) -> Result<Vec<Option<u64>>, ServerError>
use object_metadata for kind, canonical_len and logical_len
Historical mixed sizes: Blob payload, other kinds’ canonical length.
§Errors
As object_metadata; incomplete proofs remain unavailable.
Sourcepub async fn issue_urls(
&self,
targets: &[UrlTarget],
ttl_s: u32,
) -> Result<Vec<Option<IssuedUrl>>, ServerError>
pub async fn issue_urls( &self, targets: &[UrlTarget], ttl_s: u32, ) -> Result<Vec<Option<IssuedUrl>>, ServerError>
Issue at most 16 URL tokens, preserving order and duplicates.
Requires configured URL-token keys. Inaccessible targets are uniformly
absent. Tokens bind unresolved targets exactly as IssueObjectUrl does,
after a bounded published-view preflight, including for Owner readers.
§Errors
As Self::read_canonical, plus unimplemented without URL-token keys.
Targets whose reachability cannot be proved within decode/walk limits are absent.