fn is_policy_key(key: &Metadatum) -> Option<PolicyId> {
    match key {
        Metadatum::Bytes(x) if x.len() == 28 => Some(x.to_vec()),
        Metadatum::Text(x) if x.len() == 56 => Some(hex::decode(x).unwrap()),
        _ => None,
    }
}
// Heuristic approach for filtering policy entries. This is the best I could
// come up with. Is there a better, official way?
Heuristic approach for filtering policy entries. This is the best I could
come up with.
Heuristic approach for filtering policy entries . This is the best I could come up with .
fn is_policy_key(key: &Metadatum) -> Option<PolicyId> {
    match key {
        Metadatum::Bytes(x) if x.len() == 28 => Some(x.to_vec()),
        Metadatum::Text(x) if x.len() == 56 => Some(hex::decode(x).unwrap()),
        _ => None,
    }
}
fn is_policy_key ( key : & Metadatum ) -> Option < PolicyId > { match key { Metadatum :: Bytes ( x ) if x . len ( ) == 28 => Some ( x . to_vec ( ) ) , Metadatum :: Text ( x ) if x . len ( ) == 56 => Some ( hex :: decode ( x ) . unwrap ( ) ) , _ => None , } }
Heuristic approach for filtering policy entries.
Heuristic approach for filtering policy entries .
key
&Metadatum
key
&Metadatum