Enum rustc_target::abi::Primitive
source · Expand description
Fundamental unit of memory access and layout.
Variants
Int(Integer, bool)
The bool
is the signedness of the Integer
type.
One would think we would not care about such details this low down, but some ABIs are described in terms of C types and ISAs where the integer arithmetic is done on {sign,zero}-extended registers, e.g. a negative integer passed by zero-extension will appear positive in the callee, and most operations on it will produce the wrong values.
F32
F64
Pointer
Implementations
Trait Implementations
sourceimpl<__CTX> HashStable<__CTX> for Primitivewhere
__CTX: HashStableContext,
impl<__CTX> HashStable<__CTX> for Primitivewhere
__CTX: HashStableContext,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
impl Copy for Primitive
impl Eq for Primitive
impl StructuralEq for Primitive
impl StructuralPartialEq for Primitive
Auto Trait Implementations
impl RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl UnwindSafe for Primitive
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 2 bytes
Size for each variant:
Int
: 2 bytesF32
: 0 bytesF64
: 0 bytesPointer
: 0 bytes