Enum cpp_to_rust_common::target::Condition
[−]
[src]
pub enum Condition { Arch(Arch), OS(OS), Family(Family), Env(Env), PointerWidth(PointerWidth), Endian(Endian), And(Vec<Condition>), Or(Vec<Condition>), Not(Box<Condition>), True, False, }
Condition on properties of the target. Simple conditions
are considered true if the property of the current platform
is the same as the associated value of the enum. For
example, Condition::OS(OS::Windows)
will be true on Windows
and false otherwise. And
, Or
and Not
variants provide
logical operations on nested conditions. True
and False
variants provide conditions which are always true and false,
respectively.
Variants
Arch(Arch)
OS(OS)
Family(Family)
Env(Env)
PointerWidth(PointerWidth)
Endian(Endian)
And(Vec<Condition>)
Or(Vec<Condition>)
Not(Box<Condition>)
True
False
Methods
impl Condition
[src]
fn eval(&self, target: &Target) -> bool
Evaluate the condition for target
. Returns true if
target
matches the condition.
fn negate(&self) -> Condition
Construct a condition opposite to self
.
Trait Implementations
impl Debug for Condition
[src]
impl Clone for Condition
[src]
fn clone(&self) -> Condition
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Condition
[src]
fn eq(&self, __arg_0: &Condition) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Condition) -> bool
This method tests for !=
.