pub fn get(key: &str) -> Result<String, MIDError>Expand description
Gets unique platform metrics and returns a Result, which can be a MID hash (SHA-256) or a MIDError.
§Errors
Returns Err if an error occurred while creating the MachineID.
§Example
fn get_machine_id() -> Result<String, String> {
match mid::get("mySecretKey") {
Ok(mid) => Ok(mid),
Err(err) => {
println!("MID error: {}", err.to_string());
Err(err.to_string())
}
}
}