pub struct ExactRetrievalProof { /* private fields */ }Expand description
Canonical exact-retrieval proof with embedded request and outcome.
Implementations§
Source§impl ExactRetrievalProof
impl ExactRetrievalProof
Sourcepub fn anchor(&self) -> &RetrievalProofAnchor
pub fn anchor(&self) -> &RetrievalProofAnchor
Returns the exact snapshot/log anchor.
Sourcepub fn anchor_digest(&self) -> [u8; 32]
pub fn anchor_digest(&self) -> [u8; 32]
Returns the caller-pinnable anchor digest.
Sourcepub fn semantics_version(&self) -> u16
pub fn semantics_version(&self) -> u16
Returns the bound exact-retrieval semantics version.
Sourcepub fn request(&self) -> &ExactRetrievalRequest
pub fn request(&self) -> &ExactRetrievalRequest
Returns the complete proven request.
Sourcepub fn outcome(&self) -> &ExactRetrievalOutcome
pub fn outcome(&self) -> &ExactRetrievalOutcome
Returns the complete proven outcome.
Sourcepub fn proof_digest(&self) -> [u8; 32]
pub fn proof_digest(&self) -> [u8; 32]
Returns the digest of the complete canonical proof bytes.
Source§impl ExactRetrievalProof
impl ExactRetrievalProof
Sourcepub fn new(
snapshot: &SnapshotInfo,
request: ExactRetrievalRequest,
outcome: ExactRetrievalOutcome,
) -> Result<Self, RetrievalProofError>
pub fn new( snapshot: &SnapshotInfo, request: ExactRetrievalRequest, outcome: ExactRetrievalOutcome, ) -> Result<Self, RetrievalProofError>
Creates a canonical exact proof over a format-2 snapshot.
§Errors
Returns an error for a legacy witness, invalid model, or proof bound.
Sourcepub fn to_bytes(&self) -> Result<Vec<u8>, RetrievalProofError>
pub fn to_bytes(&self) -> Result<Vec<u8>, RetrievalProofError>
Encodes the complete proof into canonical portable bytes.
§Errors
Returns an error for an invalid model or exceeded hard bound.
Sourcepub fn from_bytes(encoded: &[u8]) -> Result<Self, RetrievalProofError>
pub fn from_bytes(encoded: &[u8]) -> Result<Self, RetrievalProofError>
Verifies and decodes canonical proof bytes.
§Errors
Returns a framing, version, canonicality, checksum, or digest error.
Trait Implementations§
Source§impl Clone for ExactRetrievalProof
impl Clone for ExactRetrievalProof
Source§fn clone(&self) -> ExactRetrievalProof
fn clone(&self) -> ExactRetrievalProof
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExactRetrievalProof
impl Debug for ExactRetrievalProof
impl Eq for ExactRetrievalProof
Source§impl PartialEq for ExactRetrievalProof
impl PartialEq for ExactRetrievalProof
impl StructuralPartialEq for ExactRetrievalProof
Auto Trait Implementations§
impl Freeze for ExactRetrievalProof
impl RefUnwindSafe for ExactRetrievalProof
impl Send for ExactRetrievalProof
impl Sync for ExactRetrievalProof
impl Unpin for ExactRetrievalProof
impl UnsafeUnpin for ExactRetrievalProof
impl UnwindSafe for ExactRetrievalProof
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
Mutably borrows from an owned value. Read more