Struct cargo::util::toml::TomlProfile
source · pub struct TomlProfile {Show 17 fields
pub opt_level: Option<TomlOptLevel>,
pub lto: Option<StringOrBool>,
pub codegen_backend: Option<InternedString>,
pub codegen_units: Option<u32>,
pub debug: Option<TomlDebugInfo>,
pub split_debuginfo: Option<String>,
pub debug_assertions: Option<bool>,
pub rpath: Option<bool>,
pub panic: Option<String>,
pub overflow_checks: Option<bool>,
pub incremental: Option<bool>,
pub dir_name: Option<InternedString>,
pub inherits: Option<InternedString>,
pub strip: Option<StringOrBool>,
pub rustflags: Option<Vec<InternedString>>,
pub package: Option<BTreeMap<ProfilePackageSpec, TomlProfile>>,
pub build_override: Option<Box<TomlProfile>>,
}
Fields§
§opt_level: Option<TomlOptLevel>
§lto: Option<StringOrBool>
§codegen_backend: Option<InternedString>
§codegen_units: Option<u32>
§debug: Option<TomlDebugInfo>
§split_debuginfo: Option<String>
§debug_assertions: Option<bool>
§rpath: Option<bool>
§panic: Option<String>
§overflow_checks: Option<bool>
§incremental: Option<bool>
§dir_name: Option<InternedString>
§inherits: Option<InternedString>
§strip: Option<StringOrBool>
§rustflags: Option<Vec<InternedString>>
§package: Option<BTreeMap<ProfilePackageSpec, TomlProfile>>
§build_override: Option<Box<TomlProfile>>
Implementations§
source§impl TomlProfile
impl TomlProfile
sourcepub fn validate(
&self,
name: &str,
cli_unstable: &CliUnstable,
features: &Features,
warnings: &mut Vec<String>
) -> CargoResult<()>
pub fn validate( &self, name: &str, cli_unstable: &CliUnstable, features: &Features, warnings: &mut Vec<String> ) -> CargoResult<()>
Checks stytax validity and unstable feature gate for a given profile.
sourcepub fn validate_name(name: &str) -> CargoResult<()>
pub fn validate_name(name: &str) -> CargoResult<()>
Validate dir-names and profile names according to RFC 2678.
sourcefn validate_profile(
&self,
name: &str,
cli_unstable: &CliUnstable,
features: &Features
) -> CargoResult<()>
fn validate_profile( &self, name: &str, cli_unstable: &CliUnstable, features: &Features ) -> CargoResult<()>
Validates a profile.
This is a shallow check, which is reused for the profile itself and any overrides.
sourcefn validate_override(&self, which: &str) -> CargoResult<()>
fn validate_override(&self, which: &str) -> CargoResult<()>
Validation that is specific to an override.
sourcepub fn merge(&mut self, profile: &TomlProfile)
pub fn merge(&mut self, profile: &TomlProfile)
Overwrite self’s values with the given profile.
Trait Implementations§
source§impl Clone for TomlProfile
impl Clone for TomlProfile
source§fn clone(&self) -> TomlProfile
fn clone(&self) -> TomlProfile
Returns a copy 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 Debug for TomlProfile
impl Debug for TomlProfile
source§impl Default for TomlProfile
impl Default for TomlProfile
source§fn default() -> TomlProfile
fn default() -> TomlProfile
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for TomlProfilewhere
TomlProfile: Default,
impl<'de> Deserialize<'de> for TomlProfilewhere TomlProfile: Default,
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<TomlProfile> for TomlProfile
impl PartialEq<TomlProfile> for TomlProfile
source§fn eq(&self, other: &TomlProfile) -> bool
fn eq(&self, other: &TomlProfile) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for TomlProfile
impl Serialize for TomlProfile
impl Eq for TomlProfile
impl StructuralEq for TomlProfile
impl StructuralPartialEq for TomlProfile
Auto Trait Implementations§
impl RefUnwindSafe for TomlProfile
impl Send for TomlProfile
impl Sync for TomlProfile
impl Unpin for TomlProfile
impl UnwindSafe for TomlProfile
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
§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
§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
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 264 bytes