Skip to main content

windows_metadata/
type_name.rs

1use super::*;
2
3#[derive(Debug, PartialEq, Clone)]
4pub struct TypeName {
5    pub namespace: String,
6    pub name: String,
7    pub generics: Vec<Type>,
8}
9
10impl TypeName {
11    pub fn named(namespace: &str, name: &str) -> Self {
12        TypeName {
13            namespace: namespace.to_string(),
14            name: name.to_string(),
15            generics: vec![],
16        }
17    }
18}
19
20impl PartialEq<(&str, &str)> for &TypeName {
21    fn eq(&self, other: &(&str, &str)) -> bool {
22        self.namespace == other.0 && self.name == other.1
23    }
24}