pub struct CodegenConfig {
pub comment_autogen: bool,
pub add_rustfmt_attributes: bool,
pub track_autogen: bool,
pub yin: bool,
pub release: bool,
}
Expand description
Runtime options for code generation.
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
.
Overriden to be false when release
is true.
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.
Overriden to be false when release
is true for comment_autogen
is false.
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§
Source§impl Clone for CodegenConfig
impl Clone for CodegenConfig
Source§fn clone(&self) -> CodegenConfig
fn clone(&self) -> CodegenConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CodegenConfig
impl Debug for CodegenConfig
Source§impl Default for CodegenConfig
impl Default for CodegenConfig
impl Copy for CodegenConfig
Auto Trait Implementations§
impl Freeze for CodegenConfig
impl RefUnwindSafe for CodegenConfig
impl Send for CodegenConfig
impl Sync for CodegenConfig
impl Unpin for CodegenConfig
impl UnwindSafe for CodegenConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more