pub struct Triple {
pub architecture: Architecture,
pub vendor: Vendor,
pub operating_system: OperatingSystem,
pub environment: Environment,
pub binary_format: BinaryFormat,
}
Expand description
A target “triple”. Historically such things had three fields, though they’ve added additional fields over time.
Note that Triple
doesn’t implement Default
itself. If you want a type
which defaults to the host triple, or defaults to unknown-unknown-unknown,
use DefaultToHost
or DefaultToUnknown
, respectively.
Fields§
§architecture: Architecture
The “architecture” (and sometimes the subarchitecture).
vendor: Vendor
The “vendor” (whatever that means).
operating_system: OperatingSystem
The “operating system” (sometimes also the environment).
environment: Environment
The “environment” on top of the operating system (often omitted for operating systems with a single predominant environment).
binary_format: BinaryFormat
The “binary format” (rarely used).
Implementations§
Source§impl Triple
impl Triple
Sourcepub fn endianness(&self) -> Result<Endianness, ()>
pub fn endianness(&self) -> Result<Endianness, ()>
Return the endianness of this target’s architecture.
Sourcepub fn pointer_width(&self) -> Result<PointerWidth, ()>
pub fn pointer_width(&self) -> Result<PointerWidth, ()>
Return the pointer width of this target’s architecture.
This function is aware of x32 and ilp32 ABIs on 64-bit architectures.
Sourcepub fn default_calling_convention(&self) -> Result<CallingConvention, ()>
pub fn default_calling_convention(&self) -> Result<CallingConvention, ()>
Return the default calling convention for the given target triple.
Sourcepub fn data_model(&self) -> Result<CDataModel, ()>
pub fn data_model(&self) -> Result<CDataModel, ()>
The C data model for a given target. If the model is not known, returns Err(())
.
Trait Implementations§
impl Eq for Triple
impl StructuralPartialEq for Triple
Auto Trait Implementations§
impl Freeze for Triple
impl RefUnwindSafe for Triple
impl Send for Triple
impl Sync for Triple
impl Unpin for Triple
impl UnwindSafe for Triple
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out
indicating that a T
is niched.