Skip to main content

Reader

Struct Reader 

Source
pub struct Reader { /* private fields */ }
Expand description

Builder that compiles RDL files into .winmd metadata.

Implementations§

Source§

impl Reader

Source

pub fn new() -> Self

Creates a new builder with default options.

Source

pub fn input(&mut self, input: impl AsRef<Path>) -> &mut Self

Adds an input .rdl file or directory.

Source

pub fn input_text(&mut self, input: &str) -> &mut Self

Adds inline RDL source text to compile instead of a file on disk.

Source

pub fn input_texts<I, S>(&mut self, inputs: I) -> &mut Self
where I: IntoIterator<Item = S>, S: AsRef<str>,

Adds inline RDL source texts to compile instead of files on disk.

Source

pub fn reference(&mut self, input: impl AsRef<Path>) -> &mut Self

Adds a .winmd reference file or directory.

Source

pub fn references<I, S>(&mut self, inputs: I) -> &mut Self
where I: IntoIterator<Item = S>, S: AsRef<Path>,

Adds multiple .winmd reference files or directories.

Source

pub fn reference_bytes(&mut self, input: &[u8]) -> &mut Self

Adds a .winmd reference from memory.

Source

pub fn reference_byte_sets<I, B>(&mut self, inputs: I) -> &mut Self
where I: IntoIterator<Item = B>, B: AsRef<[u8]>,

Adds .winmd references from memory.

Source

pub fn reference_default(&mut self) -> &mut Self

Adds the default Windows metadata references.

Source

pub fn inputs<I, S>(&mut self, inputs: I) -> &mut Self
where I: IntoIterator<Item = S>, S: AsRef<Path>,

Adds multiple input .rdl files or directories.

Source

pub fn output(&mut self, output: impl AsRef<Path>) -> &mut Self

Sets the output .winmd file path.

Source

pub fn write(&self) -> Result<(), Error>

Compiles the inputs and writes the .winmd to the configured output.

Trait Implementations§

Source§

impl Default for Reader

Source§

fn default() -> Reader

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.