Skip to main content

ObjectReader

Struct ObjectReader 

Source
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>

Source

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.

Source

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.

Source

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.

Source

pub async fn object_sizes( &self, ids: &[Hash], ) -> Result<Vec<Option<u64>>, ServerError>

👎Deprecated:

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.

Source

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.

Trait Implementations§

Source§

impl<'a, B: Debug, N: Debug, H: Debug> Debug for ObjectReader<'a, B, N, H>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, B, N, H> !RefUnwindSafe for ObjectReader<'a, B, N, H>

§

impl<'a, B, N, H> !Send for ObjectReader<'a, B, N, H>

§

impl<'a, B, N, H> !Sync for ObjectReader<'a, B, N, H>

§

impl<'a, B, N, H> !UnwindSafe for ObjectReader<'a, B, N, H>

§

impl<'a, B, N, H> Freeze for ObjectReader<'a, B, N, H>
where &'a Pipeline<B, N, H>: Freeze,

§

impl<'a, B, N, H> Unpin for ObjectReader<'a, B, N, H>
where &'a Pipeline<B, N, H>: Unpin,

§

impl<'a, B, N, H> UnsafeUnpin for ObjectReader<'a, B, N, H>
where &'a Pipeline<B, N, H>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more