Struct target_lexicon::Triple
source · [−]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
sourceimpl 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.
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 StructuralEq for Triple
impl StructuralPartialEq for Triple
Auto Trait Implementations
impl RefUnwindSafe for Triple
impl Send for Triple
impl Sync for Triple
impl Unpin for Triple
impl UnwindSafe for Triple
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more