pub struct Environment { /* private fields */ }Implementations§
Source§impl Environment
impl Environment
pub const fn new(arch: Arch) -> Self
pub const fn host() -> Self
Sourcepub fn set_pic(&mut self, value: bool)
pub fn set_pic(&mut self, value: bool)
Enable or disable PIC (Position independent code).
If enabled code for calls and jumps to symbols will emit near relocations
pub fn pic(&self) -> bool
Sourcepub fn set_x86_feature(&mut self, feature: X86Feature, value: bool)
pub fn set_x86_feature(&mut self, feature: X86Feature, value: bool)
Enable or disable an x86 ISA extension.
pub const fn x86_feature(&self, feature: X86Feature) -> bool
pub fn set_avx(&mut self, value: bool)
pub const fn avx(&self) -> bool
pub fn set_avx2(&mut self, value: bool)
pub const fn avx2(&self) -> bool
pub fn set_avx512f(&mut self, value: bool)
pub const fn avx512f(&self) -> bool
pub fn set_avx512bw(&mut self, value: bool)
pub const fn avx512bw(&self) -> bool
pub fn set_avx512cd(&mut self, value: bool)
pub const fn avx512cd(&self) -> bool
pub fn set_avx512dq(&mut self, value: bool)
pub const fn avx512dq(&self) -> bool
pub fn set_avx512vl(&mut self, value: bool)
pub const fn avx512vl(&self) -> bool
pub const fn arch(&self) -> Arch
Trait Implementations§
Source§impl Clone for Environment
impl Clone for Environment
Source§fn clone(&self) -> Environment
fn clone(&self) -> Environment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for Environment
impl Default for Environment
Source§impl Ord for Environment
impl Ord for Environment
Source§fn cmp(&self, other: &Environment) -> Ordering
fn cmp(&self, other: &Environment) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Environment
impl PartialEq for Environment
Source§impl PartialOrd for Environment
impl PartialOrd for Environment
impl Copy for Environment
impl Eq for Environment
impl StructuralPartialEq for Environment
Auto Trait Implementations§
impl Freeze for Environment
impl RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl UnsafeUnpin for Environment
impl UnwindSafe for Environment
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