Struct includedir_codegen::IncludeDir
[−]
[src]
pub struct IncludeDir { /* fields omitted */ }
Methods
impl IncludeDir
[src]
fn passthrough(&mut self) -> &mut IncludeDir
Don't include any data, but read from the source directory instead.
fn file<P: AsRef<Path>>(
&mut self,
path: P,
comp: Compression
) -> &mut IncludeDir
&mut self,
path: P,
comp: Compression
) -> &mut IncludeDir
Add a single file to the binary. With Gzip compression, the file will be encoded to OUT_DIR first. For chaining, it's not sensible to return a Result. If any to-be-included files can't be found, or encoded, this function will panic!.
fn add_file<P: AsRef<Path>>(&mut self, path: P, comp: Compression) -> Result<()>
Panics
This function panics when CARGO_MANIFEST_DIR or OUT_DIR are not defined.
fn dir<P: AsRef<Path>>(&mut self, path: P, comp: Compression) -> &mut IncludeDir
Add a whole directory recursively to the binary.
This function calls file
, and therefore will panic! on missing files.
fn add_dir<P: AsRef<Path>>(&mut self, path: P, comp: Compression) -> Result<()>
Panics
This function panics when CARGO_MANIFEST_DIR or OUT_DIR are not defined.