pub enum OptLevel {
O0,
O1,
O2,
O3,
S,
Z,
}Expand description
Semantic optimization level. Mirrors the GCC / Clang -O
family without exposing raw flag strings at the manifest
layer; each value maps to a fixed GCC / Clang-style -O flag
(see OptLevel::as_flag) that the build planner appends
verbatim. There is no per-toolchain flag translation today.
Variants§
O0
-O0. No optimization; the dev profile default.
O1
-O1. Lightweight optimization.
O2
-O2. Standard optimization.
O3
-O3. Aggressive optimization; the release profile default.
S
-Os. Optimize for size.
Z
-Oz. Optimize harder for size; emitted verbatim as the
GCC / Clang -Oz spelling with no per-toolchain fallback.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OptLevel
impl<'de> Deserialize<'de> for OptLevel
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for OptLevel
impl Ord for OptLevel
1.21.0 (const: unstable) · 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 PartialOrd for OptLevel
impl PartialOrd for OptLevel
impl Copy for OptLevel
impl Eq for OptLevel
impl StructuralPartialEq for OptLevel
Auto Trait Implementations§
impl Freeze for OptLevel
impl RefUnwindSafe for OptLevel
impl Send for OptLevel
impl Sync for OptLevel
impl Unpin for OptLevel
impl UnsafeUnpin 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.