pub struct VerifiedOracleReceiptCapture { /* private fields */ }Expand description
Descriptor-retained capture of the exact oracle creation receipt.
The capture is created only by open_verified_oracle_receipt_capture. It
retains the absolute parent, basename, file descriptor, exact byte count,
and SHA-256 so final result revalidation cannot silently substitute a
caller-owned byte slice.
It cannot be constructed externally:
ⓘ
use u280_evidence_oracle::VerifiedOracleReceiptCapture;
let _forged = VerifiedOracleReceiptCapture {};It is deliberately non-Clone and non-deserializable:
ⓘ
use u280_evidence_oracle::VerifiedOracleReceiptCapture;
fn require_clone<T: Clone>() {}
require_clone::<VerifiedOracleReceiptCapture>();ⓘ
use serde::de::DeserializeOwned;
use u280_evidence_oracle::VerifiedOracleReceiptCapture;
fn require_deserialize<T: DeserializeOwned>() {}
require_deserialize::<VerifiedOracleReceiptCapture>();Implementations§
Source§impl VerifiedOracleReceiptCapture
impl VerifiedOracleReceiptCapture
Sourcepub fn byte_count(&self) -> u64
pub fn byte_count(&self) -> u64
Exact receipt byte count, including the terminal newline.
Sourcepub fn sha256(&self) -> &str
pub fn sha256(&self) -> &str
SHA-256 of the exact receipt bytes, including the terminal newline.
Sourcepub fn revalidate(&self) -> Result<()>
pub fn revalidate(&self) -> Result<()>
Revalidates the retained receipt descriptor and its absolute pathname.
§Errors
Returns an error if the parent, path, metadata, byte count, or content digest changed since capture.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VerifiedOracleReceiptCapture
impl RefUnwindSafe for VerifiedOracleReceiptCapture
impl Send for VerifiedOracleReceiptCapture
impl Sync for VerifiedOracleReceiptCapture
impl Unpin for VerifiedOracleReceiptCapture
impl UnsafeUnpin for VerifiedOracleReceiptCapture
impl UnwindSafe for VerifiedOracleReceiptCapture
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