pub struct Pool {
pub name: String,
pub variables: AddOnlyVec<Variable>,
}Expand description
A pool, as defined by the pool keyword
See https://ninja-build.org/manual.html#ref_pool
§Example
use ninja_writer::*;
let ninja = Ninja::new();
let expensive = ninja.pool("expensive", 4)
.variable("foo", "bar");
let compile = ninja.rule("compile", "gcc $cflags -c $in -o $out").pool(&expensive);
assert_eq!(ninja.to_string(), r###"
pool expensive
depth = 4
foo = bar
rule compile
command = gcc $cflags -c $in -o $out
pool = expensive
"###);Fields§
§name: StringName of the pool
variables: AddOnlyVec<Variable>The list of variables, as an indented block
Currently the only useful variable is depth
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Pool
impl !RefUnwindSafe for Pool
impl !Sync for Pool
impl Send for Pool
impl Unpin for Pool
impl UnsafeUnpin for Pool
impl UnwindSafe for Pool
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