pub struct ArtifactChecksumRecord { /* private fields */ }Expand description
Maintained checksum record with a lowercase, validated SHA-256 digest.
Implementations§
Source§impl ArtifactChecksumRecord
impl ArtifactChecksumRecord
Sourcepub fn from_bytes(bytes: &[u8]) -> Self
pub fn from_bytes(bytes: &[u8]) -> Self
Compute checksum metadata from exact bytes.
Sourcepub fn from_hash(hash: &str) -> Result<Self, ChecksumError>
pub fn from_hash(hash: &str) -> Result<Self, ChecksumError>
Validate and normalize an existing digest.
§Errors
Returns ChecksumError::InvalidHash unless the input has 64 hex digits.
Trait Implementations§
Source§impl Clone for ArtifactChecksumRecord
impl Clone for ArtifactChecksumRecord
Source§impl Debug for ArtifactChecksumRecord
impl Debug for ArtifactChecksumRecord
Source§impl<'de> Deserialize<'de> for ArtifactChecksumRecord
impl<'de> Deserialize<'de> for ArtifactChecksumRecord
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 ArtifactChecksumRecord
Source§impl PartialEq for ArtifactChecksumRecord
impl PartialEq for ArtifactChecksumRecord
Source§impl Serialize for ArtifactChecksumRecord
impl Serialize for ArtifactChecksumRecord
impl StructuralPartialEq for ArtifactChecksumRecord
Auto Trait Implementations§
impl Freeze for ArtifactChecksumRecord
impl RefUnwindSafe for ArtifactChecksumRecord
impl Send for ArtifactChecksumRecord
impl Sync for ArtifactChecksumRecord
impl Unpin for ArtifactChecksumRecord
impl UnsafeUnpin for ArtifactChecksumRecord
impl UnwindSafe for ArtifactChecksumRecord
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