[][src]Struct zamm::CodegenConfig

pub struct CodegenConfig {
    pub comment_autogen: bool,
    pub add_rustfmt_attributes: bool,
    pub track_autogen: bool,
    pub yin: bool,
    pub release: bool,
}

Runtime options for code generation. Copied from Yang.

Fields

comment_autogen: bool

Whether or not to mark each generated line of code with the autogeneration comment specified by zamm_yang::codegen::mark_autogen::AUTOGENERATION_MARKER.

add_rustfmt_attributes: bool

Whether or not to add rustfmt attributes to prevent rustfmt from acting on certain lines.

track_autogen: bool

Whether or not we want Cargo to track autogenerated files and rebuild when they change.

yin: bool

Whether or not we're outputting code for Yin itself.

release: bool

Whether or not we're outputting code for release.

If we are, the implications are:

  • No autogeneration comments, so that documentation looks good on docs.rs
  • No build.rs, because there's no network access for builds on docs.rs anyways
  • Autogenerated files will be committed instead of ignored, because they can't be built without build.rs to do it
  • A release branch will be created, ready for cargo publishing

Trait Implementations

impl Clone for CodegenConfig[src]

impl Copy for CodegenConfig[src]

impl Default for CodegenConfig[src]

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> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.