pub struct Disclosure { /* private fields */ }Expand description
One Salted Disclosed Claim plus the exact bstr-encoded bytes used for hashing.
Implementations§
Source§impl Disclosure
impl Disclosure
Sourcepub fn claim(
salt: impl Into<Vec<u8>>,
key: impl Into<Label>,
value: impl Into<Value>,
) -> Result<Self, Error>
pub fn claim( salt: impl Into<Vec<u8>>, key: impl Into<Label>, value: impl Into<Value>, ) -> Result<Self, Error>
Builds a redacted map-claim disclosure.
Sourcepub fn element(
salt: impl Into<Vec<u8>>,
value: impl Into<Value>,
) -> Result<Self, Error>
pub fn element( salt: impl Into<Vec<u8>>, value: impl Into<Value>, ) -> Result<Self, Error>
Builds a redacted array-element disclosure.
Sourcepub fn from_encoded(encoded: impl Into<Vec<u8>>) -> Result<Self, Error>
pub fn from_encoded(encoded: impl Into<Vec<u8>>) -> Result<Self, Error>
Decodes and validates one bstr-encoded Salted Disclosed Claim.
Sourcepub fn kind(&self) -> &DisclosureKind
pub fn kind(&self) -> &DisclosureKind
Returns the decoded disclosure kind.
Sourcepub fn redacted_hash(&self, hasher: &dyn RedactionHasher) -> Vec<u8> ⓘ
pub fn redacted_hash(&self, hasher: &dyn RedactionHasher) -> Vec<u8> ⓘ
Computes this disclosure’s Redacted Claim Hash.
Trait Implementations§
Source§impl Clone for Disclosure
impl Clone for Disclosure
Source§fn clone(&self) -> Disclosure
fn clone(&self) -> Disclosure
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 Disclosure
impl Debug for Disclosure
Source§impl PartialEq for Disclosure
impl PartialEq for Disclosure
Source§fn eq(&self, other: &Disclosure) -> bool
fn eq(&self, other: &Disclosure) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Disclosure
Auto Trait Implementations§
impl Freeze for Disclosure
impl RefUnwindSafe for Disclosure
impl Send for Disclosure
impl Sync for Disclosure
impl Unpin for Disclosure
impl UnsafeUnpin for Disclosure
impl UnwindSafe for Disclosure
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