pub struct Variable {
pub name: String,
pub value: String,
}Expand description
A variable declaration (name = value)
See https://ninja-build.org/manual.html#_variables
§Escaping
Escaping must be done when constructing the variable. No escaping is done when serializing.
use ninja_writer::Variable;
let var = Variable::new("foo", "I have a $ in me");
assert_eq!(var.to_string(), "foo = I have a $ in me");Fields§
§name: StringThe name of the variable
value: StringThe value of the variable
Implementations§
Trait Implementations§
impl StructuralPartialEq for Variable
Auto Trait Implementations§
impl Freeze for Variable
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnsafeUnpin for Variable
impl UnwindSafe for Variable
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