pub struct TargetSpecExpression { /* private fields */ }
Expand description
A target expression, parsed from a string beginning with cfg(
.
For more information, see TargetSpec
.
Implementations§
Source§impl TargetSpecExpression
impl TargetSpecExpression
Sourcepub fn new(input: &str) -> Result<Self, ExpressionParseError>
pub fn new(input: &str) -> Result<Self, ExpressionParseError>
Creates a new TargetSpecExpression
from a string beginning with cfg(
.
Returns an error if the string could not be parsed, or if the string contains a predicate
that wasn’t understood by target-spec
.
Sourcepub fn expression_str(&self) -> &str
pub fn expression_str(&self) -> &str
Returns the string that was parsed into self
.
Trait Implementations§
Source§impl Clone for TargetSpecExpression
impl Clone for TargetSpecExpression
Source§fn clone(&self) -> TargetSpecExpression
fn clone(&self) -> TargetSpecExpression
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TargetSpecExpression
impl Debug for TargetSpecExpression
Source§impl Display for TargetSpecExpression
impl Display for TargetSpecExpression
Auto Trait Implementations§
impl Freeze for TargetSpecExpression
impl RefUnwindSafe for TargetSpecExpression
impl Send for TargetSpecExpression
impl Sync for TargetSpecExpression
impl Unpin for TargetSpecExpression
impl UnwindSafe for TargetSpecExpression
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