pub struct LexicalRetrievalProof { /* private fields */ }Expand description
Canonical lexical-retrieval proof with embedded request and outcome.
Implementations§
Source§impl LexicalRetrievalProof
impl LexicalRetrievalProof
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 lexical semantics version.
Sourcepub fn request(&self) -> &LexicalRequest
pub fn request(&self) -> &LexicalRequest
Returns the complete proven lexical request.
Sourcepub fn outcome(&self) -> &LexicalOutcome
pub fn outcome(&self) -> &LexicalOutcome
Returns the complete proven lexical outcome.
Sourcepub fn proof_digest(&self) -> [u8; 32]
pub fn proof_digest(&self) -> [u8; 32]
Returns the digest of the canonical proof bytes.
Source§impl LexicalRetrievalProof
impl LexicalRetrievalProof
Sourcepub fn new(
snapshot: &SnapshotInfo,
request: LexicalRequest,
outcome: LexicalOutcome,
) -> Result<Self, RetrievalProofError>
pub fn new( snapshot: &SnapshotInfo, request: LexicalRequest, outcome: LexicalOutcome, ) -> Result<Self, RetrievalProofError>
Creates a canonical lexical 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 lexical proof bytes.
§Errors
Returns a framing, version, canonicality, checksum, or digest error.
Trait Implementations§
Source§impl Clone for LexicalRetrievalProof
impl Clone for LexicalRetrievalProof
Source§fn clone(&self) -> LexicalRetrievalProof
fn clone(&self) -> LexicalRetrievalProof
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 LexicalRetrievalProof
impl Debug for LexicalRetrievalProof
impl Eq for LexicalRetrievalProof
Source§impl PartialEq for LexicalRetrievalProof
impl PartialEq for LexicalRetrievalProof
impl StructuralPartialEq for LexicalRetrievalProof
Auto Trait Implementations§
impl Freeze for LexicalRetrievalProof
impl RefUnwindSafe for LexicalRetrievalProof
impl Send for LexicalRetrievalProof
impl Sync for LexicalRetrievalProof
impl Unpin for LexicalRetrievalProof
impl UnsafeUnpin for LexicalRetrievalProof
impl UnwindSafe for LexicalRetrievalProof
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