[][src]Struct winmd::TypeReader

pub struct TypeReader {
    pub files: Vec<File>,
    pub types: BTreeMap<String, BTreeMap<String, TypeDef>>,
}

A reader of type information from Windows Metadata

Fields

files: Vec<File>

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. The keys are the namespace and the values is a mapping of type names to type definitions

Implementations

impl TypeReader[src]

pub fn from_os() -> Self[src]

Access the windows metadata data directory on Windows.

This is set in the windir environment variable

Panics

This function panics if the windir environment variable is set or if the files where the windows metadata is stored cannot be read.

pub fn from_win32<P: AsRef<Path>>(file: P) -> Self[src]

Insert win32 metadata at a given path

Panics

This function panics if the if the file where the windows metadata is stored cannot be read.

pub fn from_iter<I: IntoIterator<Item = PathBuf>>(files: I) -> Self[src]

Insert WinRT metadata at the given paths

Panics

This function panics if the if the files where the windows metadata are stored cannot be read.

pub fn namespaces(&self) -> impl Iterator<Item = &String>[src]

Get all the namespace names that the TypeReader knows about

pub fn namespace_types(
    &self,
    namespace: &str
) -> impl Iterator<Item = (&str, &TypeDef)>
[src]

Get all type definitions (TypeDefs) for a given namespace

Panics

Panics if the namespace does not exist

pub fn resolve_type_def(&self, (namespace, type_name): (&str, &str)) -> TypeDef[src]

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

pub fn u32(&self, row: Row, column: u32) -> u32[src]

Read a u32 value from a specific Row and column

pub fn str(&self, row: Row, column: u32) -> &str[src]

Read a [&str] value from a specific Row and column

pub fn blob(&self, row: Row, column: u32) -> Blob<'_>[src]

Read a blob for a given row and column

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.