mod body; mod error; mod sort; mod source; mod types; pub use body::HfSourceBody; pub use error::HfSourceError; pub use source::{HfInventory, HfSource}; pub use types::{ HfInventoryDescriptor, HfMember, HfMemberStorage, HfRepoType, HfSelection, HfSnapshotIdentity, HfSourceRequest, }; fn digest_hex(bytes: impl AsRef<[u8]>) -> String { const DIGITS: &[u8; 16] = b"0123456789abcdef"; let bytes = bytes.as_ref(); let mut encoded = String::with_capacity(bytes.len() * 2); for &byte in bytes { encoded.push(DIGITS[(byte >> 4) as usize] as char); encoded.push(DIGITS[(byte & 0x0f) as usize] as char); } encoded }