#[non_exhaustive]pub struct CargoSetInputs<'g> {
pub options: CargoOptions<'g>,
pub features_only: FeatureSet<'g>,
}Expand description
The inputs to a CargoSet other than the initials.
The initials are kept separate so that one CargoSetInputs can be reused
across many CargoSets via to_cargo_set.
Both fields must refer to the same PackageGraph as the initials they
are used with.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.options: CargoOptions<'g>The Cargo options used to build the CargoSet.
features_only: FeatureSet<'g>The features-only set: see CargoSet::new.
Implementations§
Source§impl<'g> CargoSetInputs<'g>
impl<'g> CargoSetInputs<'g>
Sourcepub fn new(options: CargoOptions<'g>, features_only: FeatureSet<'g>) -> Self
pub fn new(options: CargoOptions<'g>, features_only: FeatureSet<'g>) -> Self
Creates a new CargoSetInputs from the given inputs.
Sourcepub fn to_cargo_set(
&self,
initials: FeatureSet<'g>,
) -> Result<CargoSet<'g>, Error>
pub fn to_cargo_set( &self, initials: FeatureSet<'g>, ) -> Result<CargoSet<'g>, Error>
Simulates a Cargo build of initials with these inputs.
This is a shorthand for CargoSet::new.
§Panics
Panics if initials was built from a different package graph than
these inputs.
Trait Implementations§
Source§impl<'g> Clone for CargoSetInputs<'g>
impl<'g> Clone for CargoSetInputs<'g>
Source§fn clone(&self) -> CargoSetInputs<'g>
fn clone(&self) -> CargoSetInputs<'g>
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 moreAuto Trait Implementations§
impl<'g> Freeze for CargoSetInputs<'g>
impl<'g> RefUnwindSafe for CargoSetInputs<'g>
impl<'g> Send for CargoSetInputs<'g>
impl<'g> Sync for CargoSetInputs<'g>
impl<'g> Unpin for CargoSetInputs<'g>
impl<'g> UnsafeUnpin for CargoSetInputs<'g>
impl<'g> UnwindSafe for CargoSetInputs<'g>
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more