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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)