Struct build_script::instruction::Instruction [−][src]
An instruction. Used as a rusty way to parse arguments in build scripts.
Fields
prefix: PrefixThe prefix. Usually Cargo.
name: Option<String>The name of the instruction. Most of the time it’s filled in, only when a new mapping
new_mapping() is created it’s not.
value: ValueThe Value of the Instruction.
Implementations
impl Instruction[src]
impl Instruction[src]pub fn new(name: &str, value: Value) -> Self[src]
Create a new Instruction. 99% of the time this should suffice instead of
new_mapping().
pub fn new_mapping(value: Value) -> Self[src]
Create a new Instruction Mapping. Only 1% of the time is this proven useful, instead use new().
Panics
This panics if value is not a Mapping or
UnquotedMapping.
pub fn prefix(&mut self, prefix: Prefix) -> &mut Self[src]
Set the prefix.
pub fn name(&mut self, name: &str) -> &mut Self[src]
Set the name.
Trait Implementations
impl Clone for Instruction[src]
impl Clone for Instruction[src]fn clone(&self) -> Instruction[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Eq for Instruction[src]
impl Eq for Instruction[src]impl Hash for Instruction[src]
impl Hash for Instruction[src]impl Ord for Instruction[src]
impl Ord for Instruction[src]impl PartialEq<Instruction> for Instruction[src]
impl PartialEq<Instruction> for Instruction[src]fn eq(&self, other: &Instruction) -> bool[src]
fn ne(&self, other: &Instruction) -> bool[src]
impl PartialOrd<Instruction> for Instruction[src]
impl PartialOrd<Instruction> for Instruction[src]impl StructuralEq for Instruction[src]
impl StructuralEq for Instruction[src]impl StructuralPartialEq for Instruction[src]
impl StructuralPartialEq for Instruction[src]Auto Trait Implementations
impl RefUnwindSafe for Instruction
impl RefUnwindSafe for Instructionimpl Send for Instruction
impl Send for Instructionimpl Sync for Instruction
impl Sync for Instructionimpl Unpin for Instruction
impl Unpin for Instructionimpl UnwindSafe for Instruction
impl UnwindSafe for Instruction