pub trait SwhidMphf {
// Required methods
fn load(basepath: impl AsRef<Path>) -> Result<Self>
where Self: Sized;
fn hash_str(&self, swhid: impl AsRef<str>) -> Option<NodeId>;
fn hash_str_array(&self, swhid: &[u8; 50]) -> Option<NodeId>;
// Provided methods
fn hash_array(&self, swhid: &[u8; 22]) -> Option<NodeId> { ... }
fn hash_swhid(&self, swhid: &SWHID) -> Option<NodeId> { ... }
}
Expand description
Required Methods§
fn load(basepath: impl AsRef<Path>) -> Result<Self>where Self: Sized,
Provided Methods§
Object Safety§
This trait is not object safe.