pub enum CxxStandard {
Cxx98,
Cxx11,
Cxx14,
Cxx17,
Cxx20,
Cxx23,
Cxx26,
}Expand description
C++ language standards Cabin can request, oldest to newest, in
the plain chronological chain. Implements the level chain
Level_C++ of spec D2
(docs/design/standard-compatibility/spec.md): chronological
enumeration order, not numeric (c++98 < c++11), with no
equivalence special case anywhere in the chain. The c++03
alias is normalized away by Self::parse and is not an
element of the chain (D2 remark).
Variants§
Implementations§
Source§impl CxxStandard
impl CxxStandard
pub const ALL: [Self; 7]
pub const fn as_str(self) -> &'static str
Sourcepub fn parse(value: &str) -> Result<Self, LanguageStandardParseError>
pub fn parse(value: &str) -> Result<Self, LanguageStandardParseError>
§Errors
Returns LanguageStandardParseError when value is not a
recognized C++ standard: a dedicated variant for range-like
inputs and for the interface-only none, otherwise the
invalid-value error listing the accepted identifiers.
c++03 parses as an alias of c++98, normalized
immediately.
Trait Implementations§
Source§impl Clone for CxxStandard
impl Clone for CxxStandard
Source§fn clone(&self) -> CxxStandard
fn clone(&self) -> CxxStandard
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CxxStandard
Source§impl Debug for CxxStandard
impl Debug for CxxStandard
Source§impl<'de> Deserialize<'de> for CxxStandard
impl<'de> Deserialize<'de> for CxxStandard
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 Display for CxxStandard
impl Display for CxxStandard
impl Eq for CxxStandard
Source§impl FromStr for CxxStandard
impl FromStr for CxxStandard
Source§impl Hash for CxxStandard
impl Hash for CxxStandard
Source§impl Ord for CxxStandard
impl Ord for CxxStandard
Source§fn cmp(&self, other: &CxxStandard) -> Ordering
fn cmp(&self, other: &CxxStandard) -> Ordering
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 PartialEq for CxxStandard
impl PartialEq for CxxStandard
Source§fn eq(&self, other: &CxxStandard) -> bool
fn eq(&self, other: &CxxStandard) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for CxxStandard
impl PartialOrd for CxxStandard
Source§impl Serialize for CxxStandard
impl Serialize for CxxStandard
impl StructuralPartialEq for CxxStandard
Auto Trait Implementations§
impl Freeze for CxxStandard
impl RefUnwindSafe for CxxStandard
impl Send for CxxStandard
impl Sync for CxxStandard
impl Unpin for CxxStandard
impl UnsafeUnpin for CxxStandard
impl UnwindSafe for CxxStandard
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.