pub struct Target { /* private fields */ }
Expand description
A target platform
Commonly represented as a target triple
. A target triple consists of three (or four) components: the
architecture component, the vendor component, the operating system component and optionally
a fourth component representing the environment (e.g. gnu or msvc).
§Reading materials
Implementations§
Source§impl Target
impl Target
Sourcepub const fn host() -> Self
pub const fn host() -> Self
Create a new Target
instance which represents the host
platform.
The platform on which this library is compiled, will be the host
platform.
Sourcepub fn try_from_target_triple(triple: &str) -> Result<Self, ParseError>
pub fn try_from_target_triple(triple: &str) -> Result<Self, ParseError>
Create a new Target
instance from a target triple
.
- See also: Rustc platform support
Sourcepub fn from_target_triple_or_unknown(triple: &str) -> Self
pub fn from_target_triple_or_unknown(triple: &str) -> Self
Create a new Target
instance from a target triple
, defaults to
unknown-unknown-unknown
if the give triple is not recognized.
- See also: Rustc platform support
Trait Implementations§
impl Eq for Target
impl StructuralPartialEq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnwindSafe for Target
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