pub struct InputIdentity { /* private fields */ }Expand description
Immutable identity of the bytes used to produce one file report.
The digest is lowercase hexadecimal SHA-256 so consumers can compare identities without retaining the source bytes themselves.
Implementations§
Source§impl InputIdentity
impl InputIdentity
Sourcepub fn from_bytes(bytes: &[u8]) -> Self
pub fn from_bytes(bytes: &[u8]) -> Self
Calculate the identity for source bytes.
Sourcepub fn from_sha256_digest(digest: [u8; 32], bytes: u64) -> Self
pub fn from_sha256_digest(digest: [u8; 32], bytes: u64) -> Self
Construct an identity from an already-computed SHA-256 digest and exact byte count.
This keeps streaming and bounded readers on the same lowercase digest authority without exposing an unchecked string constructor.
Trait Implementations§
Source§impl Clone for InputIdentity
impl Clone for InputIdentity
Source§fn clone(&self) -> InputIdentity
fn clone(&self) -> InputIdentity
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 InputIdentity
impl Debug for InputIdentity
Source§impl<'de> Deserialize<'de> for InputIdentity
impl<'de> Deserialize<'de> for InputIdentity
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for InputIdentity
Source§impl PartialEq for InputIdentity
impl PartialEq for InputIdentity
Source§impl Serialize for InputIdentity
impl Serialize for InputIdentity
impl StructuralPartialEq for InputIdentity
Auto Trait Implementations§
impl Freeze for InputIdentity
impl RefUnwindSafe for InputIdentity
impl Send for InputIdentity
impl Sync for InputIdentity
impl Unpin for InputIdentity
impl UnsafeUnpin for InputIdentity
impl UnwindSafe for InputIdentity
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