windows_metadata/reader/tables/
generic_param.rs

1use super::*;
2
3impl std::fmt::Debug for GenericParam<'_> {
4    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5        f.debug_tuple("GenericParam").field(&self.name()).finish()
6    }
7}
8
9impl GenericParam<'_> {
10    pub fn sequence(&self) -> u16 {
11        self.usize(0).try_into().unwrap()
12    }
13
14    pub fn flags(&self) -> GenericParamAttributes {
15        GenericParamAttributes(self.usize(1).try_into().unwrap())
16    }
17
18    pub fn owner(&self) -> TypeOrMethodDef {
19        self.decode(2)
20    }
21
22    pub fn name(&self) -> &str {
23        self.str(3)
24    }
25}