pub fn new(input: impl Into<Cow<'static, str>>) -> Result<Self, Error> {
        let input = input.into();

        if input.starts_with("cfg(") {
            Ok(TargetSpec::Expression(TargetExpression::new(&input)?))
        } else {
            match Triple::new(input) {
                Ok(triple) => Ok(TargetSpec::Triple(triple)),
                Err(parse_err) => Err(Error::UnknownTargetTriple(parse_err)),
            }
        }
    }
/// Creates a new target from a string.
Creates a new target from a string.
Creates a new target from a string .
pub fn new(input: impl Into<Cow<'static, str>>) -> Result<Self, Error> {
        let input = input.into();
        if input.starts_with("cfg(") {
            Ok(TargetSpec::Expression(TargetExpression::new(&input)?))
        } else {
            match Triple::new(input) {
                Ok(triple) => Ok(TargetSpec::Triple(triple)),
                Err(parse_err) => Err(Error::UnknownTargetTriple(parse_err)),
            }
        }
    }
pub fn new ( input : impl Into < Cow < ' static , str > > ) -> Result < Self , Error > { let input = input . into ( ) ; if input . starts_with ( " " ) { Ok ( TargetSpec :: Expression ( TargetExpression :: new ( & input ) ? ) ) } else { match Triple :: new ( input ) { Ok ( triple ) => Ok ( TargetSpec :: Triple ( triple ) ) , Err ( parse_err ) => Err ( Error :: UnknownTargetTriple ( parse_err ) ) , } } }
Creates a new target from a string.
Creates a new target from a string .
input
impl Into<Cow<'static, str>>
input
impl Into<Cow<'static, str>>