pub struct PreparedSource<'a, 's> { /* private fields */ }Expand description
A private structural preparation, not an authenticated/encrypted publication. Deliberately no Debug: retained index bytes contain private names and metadata.
Implementations§
Source§impl<'a, 's> PreparedSource<'a, 's>
impl<'a, 's> PreparedSource<'a, 's>
Sourcepub fn prepare(
source: &'a [u8],
limits: BundleReadLimits,
index_scratch: &mut [EntryScratch<'a>],
entries: &mut [EntryRange],
objects: &'s mut [SourceObject],
order: &mut [u32],
) -> Result<Self, Error>
pub fn prepare( source: &'a [u8], limits: BundleReadLimits, index_scratch: &mut [EntryScratch<'a>], entries: &mut [EntryRange], objects: &'s mut [SourceObject], order: &mut [u32], ) -> Result<Self, Error>
The host must retain immutable snapshot/writer exclusion for external or mapped storage throughout this lifetime. Rust’s slice borrow alone does not exclude external writers. This does not generate IDs, keys or rights.
All interval/order scratch is supplied by the caller and remains private. Full BundleReader validation uses its existing bounded cold materialization, then drops it before returning; this is not a zero-allocation hot API.
pub fn objects(&self) -> &[SourceObject]
pub fn entry_count(&self) -> usize
pub const fn metadata_length(&self) -> usize
pub fn header_bytes(&self) -> &'a [u8] ⓘ
pub fn index_bytes(&self) -> &'a [u8] ⓘ
pub fn source_bytes(&self) -> &'a [u8] ⓘ
pub fn object_bytes(&self, ordinal: usize) -> Result<&'a [u8], Error>
Auto Trait Implementations§
impl<'a, 's> Freeze for PreparedSource<'a, 's>
impl<'a, 's> RefUnwindSafe for PreparedSource<'a, 's>
impl<'a, 's> Send for PreparedSource<'a, 's>
impl<'a, 's> Sync for PreparedSource<'a, 's>
impl<'a, 's> Unpin for PreparedSource<'a, 's>
impl<'a, 's> UnsafeUnpin for PreparedSource<'a, 's>
impl<'a, 's> UnwindSafe for PreparedSource<'a, 's>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more