pub fn canonical_name(as_type: &impl AsType) -> Result<String, Error>