pub struct RangePageProof {
pub root: Option<Cid>,
pub after: Option<Vec<u8>>,
pub end: Option<Vec<u8>>,
pub path: Vec<Node>,
}Expand description
Proof for a resumable range page.
Unlike RangeProof, the lower bound is an optional exclusive cursor
boundary. That lets the proof model exactly match RangeCursor semantics:
a page proves every entry with key > after and key < end.
Fields§
§root: Option<Cid>Root CID the node set claims to prove against, or None for an empty
tree.
after: Option<Vec<u8>>Exclusive cursor lower bound. None means start at the beginning of
the keyspace.
end: Option<Vec<u8>>Exclusive page upper bound. None means unbounded.
path: Vec<Node>De-duplicated nodes needed to prove the page window.
Implementations§
Source§impl RangePageProof
impl RangePageProof
Sourcepub fn verify(&self) -> RangePageProofVerification
pub fn verify(&self) -> RangePageProofVerification
Verify this page proof without consulting a store.
Sourcepub fn path_node_bytes(&self) -> Vec<Vec<u8>>
pub fn path_node_bytes(&self) -> Vec<Vec<u8>>
Return the de-duplicated proof nodes as deterministic encoded bytes.
Sourcepub fn from_node_bytes(
root: Option<Cid>,
after: Option<Vec<u8>>,
end: Option<Vec<u8>>,
path_node_bytes: Vec<Vec<u8>>,
) -> Result<Self, Error>
pub fn from_node_bytes( root: Option<Cid>, after: Option<Vec<u8>>, end: Option<Vec<u8>>, path_node_bytes: Vec<Vec<u8>>, ) -> Result<Self, Error>
Rebuild a typed proof from encoded path nodes.
Sourcepub fn to_bundle_bytes(&self) -> Result<Vec<u8>, Error>
pub fn to_bundle_bytes(&self) -> Result<Vec<u8>, Error>
Serialize this 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 RangePageProof::to_bundle_bytes.
Trait Implementations§
Source§impl Clone for RangePageProof
impl Clone for RangePageProof
Source§fn clone(&self) -> RangePageProof
fn clone(&self) -> RangePageProof
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 RangePageProof
impl Debug for RangePageProof
Source§impl PartialEq for RangePageProof
impl PartialEq for RangePageProof
impl StructuralPartialEq for RangePageProof
Auto Trait Implementations§
impl Freeze for RangePageProof
impl RefUnwindSafe for RangePageProof
impl Send for RangePageProof
impl Sync for RangePageProof
impl Unpin for RangePageProof
impl UnsafeUnpin for RangePageProof
impl UnwindSafe for RangePageProof
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