Skip to main content

TargetArch

Trait TargetArch 

Source
pub trait TargetArch {
    // Required methods
    fn name(&self) -> &'static str;
    fn pointer_size(&self) -> usize;
    fn native_alignment(&self) -> usize;
    fn supports_unaligned_access(&self) -> bool;
    fn memory_barrier(&self);
    fn cycle_count(&self) -> Option<u64>;
}
Expand description

Target architecture trait

Required Methods§

Source

fn name(&self) -> &'static str

Get the target name

Source

fn pointer_size(&self) -> usize

Get the native pointer size in bytes

Source

fn native_alignment(&self) -> usize

Get the native alignment

Source

fn supports_unaligned_access(&self) -> bool

Check if target supports unaligned access

Source

fn memory_barrier(&self)

Perform a memory barrier

Source

fn cycle_count(&self) -> Option<u64>

Get cycle counter if available

Implementors§