pub struct DiffPageProof {
pub base: RangePageProof,
pub other: RangePageProof,
pub lookahead_base: Option<KeyProof>,
pub lookahead_other: Option<KeyProof>,
pub requested_end: Option<Vec<u8>>,
pub limit: usize,
}Expand description
Proof for a resumable diff page.
The proof verifies the base and other entries for the page key window, then
recomputes the diff offline. When another diff exists after the page, the
optional lookahead key proofs prove the first omitted diff key so the
verifier can derive the same continuation cursor as Prolly::diff_page.
Fields§
§base: RangePageProofRange-page proof over the base tree for the verified key window.
other: RangePageProofRange-page proof over the other tree for the verified key window.
lookahead_base: Option<KeyProof>Base-tree key proof for the first omitted diff key when there is another page.
lookahead_other: Option<KeyProof>Other-tree key proof for the first omitted diff key when there is another page.
requested_end: Option<Vec<u8>>Original exclusive upper bound requested by the caller.
limit: usizeOriginal page limit requested by the caller.
Implementations§
Source§impl DiffPageProof
impl DiffPageProof
Sourcepub fn verify(&self) -> DiffPageProofVerification
pub fn verify(&self) -> DiffPageProofVerification
Verify this diff-page proof without consulting a store.
Sourcepub fn to_bundle_bytes(&self) -> Result<Vec<u8>, Error>
pub fn to_bundle_bytes(&self) -> Result<Vec<u8>, Error>
Serialize this diff-page proof as a versioned, deterministic binary bundle.
Sourcepub fn from_bundle_bytes(bytes: &[u8]) -> Result<Self, Error>
pub fn from_bundle_bytes(bytes: &[u8]) -> Result<Self, Error>
Decode a proof from bytes produced by DiffPageProof::to_bundle_bytes.
Trait Implementations§
Source§impl Clone for DiffPageProof
impl Clone for DiffPageProof
Source§fn clone(&self) -> DiffPageProof
fn clone(&self) -> DiffPageProof
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DiffPageProof
impl Debug for DiffPageProof
Source§impl PartialEq for DiffPageProof
impl PartialEq for DiffPageProof
impl StructuralPartialEq for DiffPageProof
Auto Trait Implementations§
impl Freeze for DiffPageProof
impl RefUnwindSafe for DiffPageProof
impl Send for DiffPageProof
impl Sync for DiffPageProof
impl Unpin for DiffPageProof
impl UnsafeUnpin for DiffPageProof
impl UnwindSafe for DiffPageProof
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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