pub enum DisclosedPayload {
Object {
bytes: Vec<u8>,
},
Chunk {
total_size: u64,
chunk_size: u32,
index: u32,
bytes: Vec<u8>,
},
Range {
blob_id: Hash,
chunk: Option<(u32, u64, u32)>,
offset_in_blob: u64,
absolute_offset: Option<u64>,
bytes: Vec<u8>,
},
}Expand description
The disclosed content of a Disclosed result.
Variants§
Object
The leaf’s full canonical object bytes; hash/id_from_object of
bytes equals Disclosed::leaf_id.
Chunk
One whole chunk of a ChunkedBlob leaf, plus its authenticated
manifest metadata.
Fields
Range
A byte range of a Blob, or of one chunk of a ChunkedBlob.
Fields
blob_id: HashThe id of the object the range was sliced from: the leaf
itself when it is a plain Blob, or the containing chunk’s
id when the leaf is a ChunkedBlob.
chunk: Option<(u32, u64, u32)>Some((index, total_size, chunk_size)) when the leaf is a
ChunkedBlob (the authenticated manifest metadata for the
containing chunk); None when the leaf is a plain Blob.
offset_in_blob: u64The range’s offset within blob_id’s content (the chunk’s
content when chunk is Some, the blob’s content otherwise).
absolute_offset: Option<u64>The range’s offset within the whole disclosed file, when
provable: Some(offset_in_blob) for a plain Blob (nothing
further to prove) or for a ChunkedBlob at index == 0
(nothing precedes the first chunk, so no proof set is needed —
and VerifyError::UnexpectedLengthProofs rejects a
non-empty one there rather than silently ignoring it); for a
ChunkedBlob at index > 0, Some(sum of every preceding chunk's authenticated length + offset_in_blob) when a complete
0..index length-proof set was supplied, else None (not
requested).
Trait Implementations§
Source§impl Clone for DisclosedPayload
impl Clone for DisclosedPayload
Source§impl Debug for DisclosedPayload
impl Debug for DisclosedPayload
impl Eq for DisclosedPayload
Source§impl PartialEq for DisclosedPayload
impl PartialEq for DisclosedPayload
impl StructuralPartialEq for DisclosedPayload
Auto Trait Implementations§
impl Freeze for DisclosedPayload
impl RefUnwindSafe for DisclosedPayload
impl Send for DisclosedPayload
impl Sync for DisclosedPayload
impl Unpin for DisclosedPayload
impl UnsafeUnpin for DisclosedPayload
impl UnwindSafe for DisclosedPayload
Blanket Implementations§
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
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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> ⓘ
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> ⓘ
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