/// Creates a new `Platform` from the given triple and target features.
///
/// Returns an error if this platform wasn't known to `target-spec`.
Creates a new `Platform` from the given triple and target features.
Returns an error if this platform wasn't known to `target-spec`.
Creates a new ` Platform ` from the given triple and target features . Returns an error if this platform wasn ' t known to ` target - spec ` .
pub fn new(
        triple_str: impl Into<Cow<'static, str>>,
        target_features: TargetFeatures,
    ) -> Result<Self, Error> {
        let triple = Triple::new(triple_str.into()).map_err(Error::UnknownPlatformTriple)?;
        Ok(Self::from_triple(triple, target_features))
    }
pub fn new ( triple_str : impl Into < Cow < ' static , str > > , target_features : TargetFeatures , ) -> Result < Self , Error > { let triple = Triple :: new ( triple_str . into ( ) ) . map_err ( Error :: UnknownPlatformTriple ) ? ; Ok ( Self :: from_triple ( triple , target_features ) ) }
Creates a new `Platform` from the given triple and target features.
Creates a new ` Platform ` from the given triple and target features .
triple_str
impl Into<Cow<'static, str>>
target_features
TargetFeatures