pub struct TypeReader {
pub files: Vec<WinmdFile>,
pub types: BTreeMap<String, BTreeMap<String, TypeDef>>,
}
Expand description
A reader of type information from Windows Metadata
Fields§
§files: Vec<WinmdFile>
The parsed Windows metadata files the TypeReader
has access to
types: BTreeMap<String, BTreeMap<String, TypeDef>>
Types known to this TypeReader
This is a mapping between namespace names and the types inside that namespace
Implementations§
Source§impl TypeReader
impl TypeReader
pub fn from_os() -> Self
Sourcepub fn namespaces(&self) -> impl Iterator<Item = &String>
pub fn namespaces(&self) -> impl Iterator<Item = &String>
Get all the namespace names that the TypeReader
knows about
Sourcepub fn namespace_types(
&self,
namespace: &str,
) -> impl Iterator<Item = (&str, &TypeDef)>
pub fn namespace_types( &self, namespace: &str, ) -> impl Iterator<Item = (&str, &TypeDef)>
Get all type definitions ([TypeDef
]s) for a given namespace
§Panics
Panics if the namespace does not exist
Sourcepub fn resolve_type_def(&self, (namespace, type_name): (&str, &str)) -> TypeDef
pub fn resolve_type_def(&self, (namespace, type_name): (&str, &str)) -> TypeDef
Resolve a type definition given its namespace and type name
§Panics
Panics if no type definition for the given namespace and type name can be found
Sourcepub fn u32(&self, row: Row, column: u32) -> u32
pub fn u32(&self, row: Row, column: u32) -> u32
Read a u32
value from a specific [Row
] and column
Sourcepub fn str(&self, row: Row, column: u32) -> &str
pub fn str(&self, row: Row, column: u32) -> &str
Read a &str
value from a specific [Row
] and column
Sourcepub fn decode<T: Decode>(&self, row: Row, column: u32) -> T
pub fn decode<T: Decode>(&self, row: Row, column: u32) -> T
Read a T: Decode
value from a specific [Row
] and column
pub fn list( &self, row: Row, table: TableIndex, column: u32, ) -> impl Iterator<Item = Row>
pub fn blob(&self, row: Row, column: u32) -> Blob<'_>
pub fn equal_range( &self, file: u16, table: TableIndex, column: u32, value: u32, ) -> impl Iterator<Item = Row>
pub fn upper_bound( &self, file: u16, table: TableIndex, column: u32, value: u32, ) -> Row
Auto Trait Implementations§
impl Freeze for TypeReader
impl RefUnwindSafe for TypeReader
impl Send for TypeReader
impl Sync for TypeReader
impl Unpin for TypeReader
impl UnwindSafe for TypeReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more