fn is_asset_key(key: &Metadatum) -> Option<AssetName> {
    match key {
        Metadatum::Bytes(x) if x.len() <= 32 => Some(AssetName::try_from(x.as_slice()).unwrap()),
        Metadatum::Text(x) if x.as_bytes().len() <= 32 => {
            Some(AssetName::try_from(x.as_bytes()).unwrap())
        }
        _ => None,
    }
}
// Heuristic approach for filtering asset entries. Even less strict than when
// searching for policies. In this case, we only check for valid data types.
// There's probably a much more formal approach.
Heuristic approach for filtering asset entries. Even less strict than when
searching for policies. In this case, we only check for valid data types.
There's probably a much more formal approach.
Heuristic approach for filtering asset entries . Even less strict than when searching for policies . In this case we only check for valid data types . There ' s probably a much more formal approach .
fn is_asset_key(key: &Metadatum) -> Option<AssetName> {
    match key {
        Metadatum::Bytes(x) if x.len() <= 32 => Some(AssetName::try_from(x.as_slice()).unwrap()),
        Metadatum::Text(x) if x.as_bytes().len() <= 32 => {
            Some(AssetName::try_from(x.as_bytes()).unwrap())
        }
        _ => None,
    }
}
fn is_asset_key ( key : & Metadatum ) -> Option < AssetName > { match key { Metadatum :: Bytes ( x ) if x . len ( ) <= 32 => Some ( AssetName :: try_from ( x . as_slice ( ) ) . unwrap ( ) ) , Metadatum :: Text ( x ) if x . as_bytes ( ) . len ( ) <= 32 => { Some ( AssetName :: try_from ( x . as_bytes ( ) ) . unwrap ( ) ) } _ => None , } }
Heuristic approach for filtering asset entries.
Heuristic approach for filtering asset entries .
key
&Metadatum
key
&Metadatum