[−][src]Struct syn_inline_mod::InlinerBuilder
A builder that can configure how to inline modules.
After creating a builder, set configuration options using the methods
taking &mut self
, then parse and inline one or more files using
parse_and_inline_modules
.
Methods
impl InlinerBuilder
[src]
pub fn new() -> Self
[src]
Create a new InlinerBuilder
with the default options.
pub fn root(&mut self, root: bool) -> &mut Self
[src]
Configures whether the module being parsed is a root module or not.
A root module is one that is passed directly to rustc
. A non-root
module is one that is included from another module using a mod
item.
Default: true
.
pub fn error_not_found(&mut self, error_not_found: bool) -> &mut Self
[src]
Configures whether unexpanded modules (due to a missing file) will lead
to an Err
return value or not.
Default: false
.
pub fn parse_and_inline_modules(&self, src_file: &Path) -> Result<File, Error>
[src]
Parse the source code in src_file
and return a syn::File
that has all modules
recursively inlined.
Trait Implementations
impl Debug for InlinerBuilder
[src]
impl Default for InlinerBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for InlinerBuilder
impl Send for InlinerBuilder
impl Sync for InlinerBuilder
impl Unpin for InlinerBuilder
impl UnwindSafe for InlinerBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,