pub struct FieldEntryRangePlan { /* private fields */ }Expand description
Selective chunk-aligned range planner for an .emf v4 or .qac v1 entry inside an .hmc bundle.
Implementations§
Source§impl FieldEntryRangePlan
impl FieldEntryRangePlan
Sourcepub fn from_prefix(
entry: &BundleEntry,
prefix_bytes: &[u8],
limits: EnvelopeLimits,
) -> Result<Self, FieldRangeError>
pub fn from_prefix( entry: &BundleEntry, prefix_bytes: &[u8], limits: EnvelopeLimits, ) -> Result<Self, FieldRangeError>
Validate header + directory + metadata prefix bytes for entry and build a range plan.
pub fn family(&self) -> Family
pub fn entry_count(&self) -> u32
pub fn parent_header_digest(&self) -> [u8; 32]
pub fn index_commitment(&self) -> [u8; 32]
pub fn hmc_meta_range(&self) -> Range<u64> ⓘ
pub fn plan_chunk_range( &self, entry_index: u32, ) -> Result<PlannedChunkRange, FieldRangeError>
pub fn plan_chunk_ranges( &self, indices: &[u32], ) -> Result<Vec<PlannedChunkRange>, FieldRangeError>
pub fn verify_arrived_chunk( &self, plan: &PlannedChunkRange, payload: &[u8], metadata: &[u8], ) -> Result<VerifiedArrivedChunk, FieldRangeError>
pub fn claim_whole_volume_receipt( &self, verified_chunks: &[VerifiedArrivedChunk], complete_entry_bytes: Option<&[u8]>, ) -> Result<[u8; 32], FieldRangeError>
Trait Implementations§
Source§impl Clone for FieldEntryRangePlan
impl Clone for FieldEntryRangePlan
Auto Trait Implementations§
impl Freeze for FieldEntryRangePlan
impl RefUnwindSafe for FieldEntryRangePlan
impl Send for FieldEntryRangePlan
impl Sync for FieldEntryRangePlan
impl Unpin for FieldEntryRangePlan
impl UnsafeUnpin for FieldEntryRangePlan
impl UnwindSafe for FieldEntryRangePlan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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