Struct build_details::BuildDetails [−][src]
pub struct BuildDetails { /* fields omitted */ }
Code generator for build details. See the crate documentation for an example.
Methods
impl BuildDetails
[src]
impl BuildDetails
pub fn all() -> Self
[src]
pub fn all() -> Self
Construct a BuildDetails
instance with all available details marked
as optional.
pub fn none() -> Self
[src]
pub fn none() -> Self
Construct a BuildDetails
instance with no included details.
This method isn't particularly useful by itself, and will probably need
customization with BuildDetails::include
and BuildDetails::exclude
.
pub fn require(&mut self, detail: BuildDetail) -> &mut Self
[src]
pub fn require(&mut self, detail: BuildDetail) -> &mut Self
Include a BuildDetail
, and mark it as required.
If a detail is marked as required and isn't available at build time, the build will fail.
pub fn include(&mut self, detail: BuildDetail) -> &mut Self
[src]
pub fn include(&mut self, detail: BuildDetail) -> &mut Self
Include a BuildDetail
, and mark it as optional.
If a detail is marked as optional and isn't available at build time, the
generated value will be None
.
pub fn exclude(&mut self, detail: BuildDetail) -> &mut Self
[src]
pub fn exclude(&mut self, detail: BuildDetail) -> &mut Self
Exclude a BuildDetail
. It will not show up in the generated output.
pub fn generate<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
pub fn generate<P: AsRef<Path>>(&self, path: P) -> Result<()>
Creates a file called path
in the build's OUT_DIR
directory. See
the crate documentation for an example.
pub fn write_to(&self, out_file: &mut Write) -> Result<()>
[src]
pub fn write_to(&self, out_file: &mut Write) -> Result<()>
Writes the generated code to a [`::std::io::Write'] instead of to a file.
Trait Implementations
impl Debug for BuildDetails
[src]
impl Debug for BuildDetails
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for BuildDetails
[src]
impl Clone for BuildDetails
fn clone(&self) -> BuildDetails
[src]
fn clone(&self) -> BuildDetails
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for BuildDetails
[src]
impl Default for BuildDetails
Auto Trait Implementations
impl Send for BuildDetails
impl Send for BuildDetails
impl Sync for BuildDetails
impl Sync for BuildDetails