Raw digest bytes.
(&self)
| 115 | |
| 116 | /// Raw digest bytes. |
| 117 | pub fn as_bytes(&self) -> &[u8] { |
| 118 | match self { |
| 119 | GitOid::Sha1(bytes) => bytes.as_slice(), |
| 120 | GitOid::Sha256(bytes) => bytes.as_slice(), |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | /// Lowercase hex encoding, as used in Git refs and messages. |
| 125 | pub fn to_hex(&self) -> String { |