We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc2d733 commit 64b6039Copy full SHA for 64b6039
packages/std/src/checksum.rs
@@ -35,6 +35,12 @@ impl Checksum {
35
pub fn to_hex(self) -> String {
36
self.to_string()
37
}
38
+
39
+ /// Returns a reference to the inner bytes of this checksum as a slice.
40
+ /// If you need a reference to the array, use [`AsRef::as_ref`].
41
+ pub fn as_slice(&self) -> &[u8] {
42
+ &self.0
43
+ }
44
45
46
impl fmt::Display for Checksum {
0 commit comments