pub struct Profiles { /* private fields */ }Expand description
Collection of all profiles.
Implementations§
Source§impl Profiles
impl Profiles
pub fn new( profiles: Option<&TomlProfiles>, config: &Config, requested_profile: InternedString, features: &Features, ) -> CargoResult<Profiles>
Sourcepub fn get_profile(
&self,
pkg_id: PackageId,
is_member: bool,
unit_for: UnitFor,
mode: CompileMode,
) -> Profile
pub fn get_profile( &self, pkg_id: PackageId, is_member: bool, unit_for: UnitFor, mode: CompileMode, ) -> Profile
Retrieves the profile for a target.
is_member is whether or not this package is a member of the
workspace.
Sourcepub fn get_profile_run_custom_build(
&self,
for_unit_profile: &Profile,
) -> Profile
pub fn get_profile_run_custom_build( &self, for_unit_profile: &Profile, ) -> Profile
The profile for running a build.rs script is only used for setting
a few environment variables. To ensure proper de-duplication of the
running Unit, this uses a stripped-down profile (so that unrelated
profile flags don’t cause build.rs to needlessly run multiple
times).
Sourcepub fn base_profile(&self) -> Profile
pub fn base_profile(&self) -> Profile
This returns the base profile. This is currently used for the
[Finished] line. It is not entirely accurate, since it doesn’t
select for the package that was actually built.
Sourcepub fn get_dir_name(&self) -> InternedString
pub fn get_dir_name(&self) -> InternedString
Gets the directory name for a profile, like debug or release.
Sourcepub fn validate_packages(
&self,
profiles: Option<&TomlProfiles>,
shell: &mut Shell,
resolve: &Resolve,
) -> CargoResult<()>
pub fn validate_packages( &self, profiles: Option<&TomlProfiles>, shell: &mut Shell, resolve: &Resolve, ) -> CargoResult<()>
Used to check for overrides for non-existing packages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Profiles
impl RefUnwindSafe for Profiles
impl Send for Profiles
impl Sync for Profiles
impl Unpin for Profiles
impl UnsafeUnpin for Profiles
impl UnwindSafe for Profiles
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