pub struct LanguageStandardSettings {
pub c_standard: Option<StandardDeclaration<CStandard>>,
pub cxx_standard: Option<StandardDeclaration<CxxStandard>>,
pub interface_c_standard: Option<StandardDeclaration<InterfaceRequirement<CStandard>>>,
pub interface_cxx_standard: Option<StandardDeclaration<InterfaceRequirement<CxxStandard>>>,
pub gnu_extensions: Option<bool>,
}Expand description
The language fields shared by [package] and [target.<name>]:
the four standard fields (c-standard / cxx-standard /
interface-c-standard / interface-cxx-standard) plus the
gnu-extensions boolean. At [package] level each standard
field may also be the { workspace = true } opt-in marker;
target-level fields are always Declared (the parser rejects
markers there). gnu-extensions is a plain boolean (no marker
form): target level overrides package level, defaulting to
false. It selects GNU-extension compiler flag spellings only
and never participates in interface compatibility.
Fields§
§c_standard: Option<StandardDeclaration<CStandard>>§cxx_standard: Option<StandardDeclaration<CxxStandard>>§interface_c_standard: Option<StandardDeclaration<InterfaceRequirement<CStandard>>>§interface_cxx_standard: Option<StandardDeclaration<InterfaceRequirement<CxxStandard>>>§gnu_extensions: Option<bool>Implementations§
Source§impl LanguageStandardSettings
impl LanguageStandardSettings
pub fn is_empty(&self) -> bool
Sourcepub fn c_standard_value(&self) -> Option<CStandard>
pub fn c_standard_value(&self) -> Option<CStandard>
Resolved C implementation standard, when declared or inherited.
Sourcepub fn cxx_standard_value(&self) -> Option<CxxStandard>
pub fn cxx_standard_value(&self) -> Option<CxxStandard>
Resolved C++ implementation standard, when declared or inherited.
Sourcepub fn interface_c_standard_value(
&self,
) -> Option<InterfaceRequirement<CStandard>>
pub fn interface_c_standard_value( &self, ) -> Option<InterfaceRequirement<CStandard>>
Resolved C interface requirement, when declared or inherited.
Sourcepub fn interface_cxx_standard_value(
&self,
) -> Option<InterfaceRequirement<CxxStandard>>
pub fn interface_cxx_standard_value( &self, ) -> Option<InterfaceRequirement<CxxStandard>>
Resolved C++ interface requirement, when declared or inherited.
Sourcepub fn workspace_marker_field(&self) -> Option<&'static str>
pub fn workspace_marker_field(&self) -> Option<&'static str>
First field carrying the unresolved { workspace = true }
marker, for error reporting.
Trait Implementations§
Source§impl Clone for LanguageStandardSettings
impl Clone for LanguageStandardSettings
Source§fn clone(&self) -> LanguageStandardSettings
fn clone(&self) -> LanguageStandardSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LanguageStandardSettings
Source§impl Debug for LanguageStandardSettings
impl Debug for LanguageStandardSettings
Source§impl Default for LanguageStandardSettings
impl Default for LanguageStandardSettings
Source§fn default() -> LanguageStandardSettings
fn default() -> LanguageStandardSettings
Source§impl<'de> Deserialize<'de> for LanguageStandardSettings
impl<'de> Deserialize<'de> for LanguageStandardSettings
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>,
impl Eq for LanguageStandardSettings
Source§impl PartialEq for LanguageStandardSettings
impl PartialEq for LanguageStandardSettings
Source§fn eq(&self, other: &LanguageStandardSettings) -> bool
fn eq(&self, other: &LanguageStandardSettings) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for LanguageStandardSettings
impl Serialize for LanguageStandardSettings
impl StructuralPartialEq for LanguageStandardSettings
Auto Trait Implementations§
impl Freeze for LanguageStandardSettings
impl RefUnwindSafe for LanguageStandardSettings
impl Send for LanguageStandardSettings
impl Sync for LanguageStandardSettings
impl Unpin for LanguageStandardSettings
impl UnsafeUnpin for LanguageStandardSettings
impl UnwindSafe for LanguageStandardSettings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.