#[non_exhaustive]
pub enum OptLevel {
None,
Speed,
SpeedAndSize,
}
Expand description
Possible optimization levels for the Cranelift codegen backend.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
No optimizations performed, minimizes compilation time by disabling most optimizations.
Speed
Generates the fastest possible code, but may take longer.
SpeedAndSize
Similar to speed
, but also performs transformations aimed at reducing
code size.
Trait Implementations§
source§impl<'de> Deserialize<'de> for OptLevel
impl<'de> Deserialize<'de> for OptLevel
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<OptLevel> for OptLevel
impl PartialEq<OptLevel> for OptLevel
impl Eq for OptLevel
impl StructuralEq for OptLevel
impl StructuralPartialEq for OptLevel
Auto Trait Implementations§
impl RefUnwindSafe for OptLevel
impl Send for OptLevel
impl Sync for OptLevel
impl Unpin for OptLevel
impl UnwindSafe for OptLevel
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more