/// Given a partition, return true if the partition has the desired GUID
Given a partition, return true if the partition has the desired GUID
Given a partition return true if the partition has the desired GUID
async fn partition_has_guid<T>(partition: &T, desired_guid: [u8; 16]) -> bool
where
    T: PartitionProxyInterface,
{
    match partition.get_type_guid().await {
        Err(_) => false,
        Ok((_, None)) => false,
        Ok((status, Some(guid))) => {
            if zx::Status::from_raw(status) != zx::Status::OK {
                false
            } else {
                guid.value == desired_guid
            }
        }
    }
}
async fn partition_has_guid < T > ( partition : & T , desired_guid : [ u8 ; 16 ] ) -> bool where T : PartitionProxyInterface , { match partition . get_type_guid ( ) . await { Err ( _ ) => false , Ok ( ( _ , None ) ) => false , Ok ( ( status , Some ( guid ) ) ) => { if zx :: Status :: from_raw ( status ) != zx :: Status :: OK { false } else { guid . value == desired_guid } } } }
Given a partition, return true if the partition has the desired GUID
Given a partition return true if the partition has the desired GUID
partition
&T
desired_guid
[u8; 16]