Combine

Trait Combine 

Source
pub trait Combine {
    // Required method
    fn combine(self, other: Self) -> Self;
}

Required Methods§

Source

fn combine(self, other: Self) -> Self

Combine two values, preferring the values in self.

The logic should follow that of Cargo’s config.toml:

If a key is specified in multiple config files, the values will get merged together. Numbers, strings, and booleans will use the value in the deeper config directory taking precedence over ancestor directories, where the home directory is the lowest priority. Arrays will be joined together with higher precedence items being placed later in the merged array.

…with one exception: we place items with higher precedence earlier in the merged array.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Combine for Option<KeyringProviderType>

Source§

impl Combine for Option<IndexStrategy>

Source§

impl Combine for Option<ExportFormat>

Source§

impl Combine for Option<BuildIsolation>

Source§

fn combine(self, other: Self) -> Self

Source§

impl Combine for Option<Reinstall>

Source§

fn combine(self, other: Self) -> Self

Source§

impl Combine for Option<Upgrade>

Source§

fn combine(self, other: Self) -> Self

Source§

impl Combine for Option<TargetTriple>

Source§

impl Combine for Option<TrustedPublishing>

Source§

impl Combine for Option<IndexUrl>

Source§

impl Combine for Option<LinkMode>

Source§

impl Combine for Option<PythonDownloads>

Source§

impl Combine for Option<PythonPreference>

Source§

impl Combine for Option<ForkStrategy>

Source§

impl Combine for Option<PrereleaseMode>

Source§

impl Combine for Option<AnnotationStyle>

Source§

impl Combine for Option<ResolutionMode>

Source§

impl Combine for Option<TorchMode>

Source§

impl Combine for Option<AddBoundsKind>

Source§

impl Combine for Option<bool>

Source§

fn combine(self, other: Option<bool>) -> Option<bool>

Source§

impl Combine for Option<String>

Source§

fn combine(self, other: Option<String>) -> Option<String>

Source§

impl Combine for Option<PathBuf>

Source§

impl Combine for Option<IgnoredAny>

Source§

fn combine(self, _other: Self) -> Self

Source§

impl Combine for Option<Url>

Source§

fn combine(self, other: Option<Url>) -> Option<Url>

Source§

impl Combine for Option<RequiredVersion>

Source§

impl Combine for Option<ExtraBuildVariables>

Source§

fn combine(self, other: Self) -> Self

Source§

impl Combine for Option<ConfigSettings>

Source§

fn combine(self, other: Self) -> Self

Combine two maps by merging the map in self with the map in other, if they’re both Some.

Source§

impl Combine for Option<PackageConfigSettings>

Source§

fn combine(self, other: Self) -> Self

Combine two maps by merging the map in self with the map in other, if they’re both Some.

Source§

impl Combine for Option<Index>

Source§

fn combine(self, other: Option<Index>) -> Option<Index>

Source§

impl Combine for Option<PipExtraIndex>

Source§

impl Combine for Option<PipFindLinks>

Source§

impl Combine for Option<PipIndex>

Source§

impl Combine for Option<SchemaConflicts>

Source§

impl Combine for Option<SupportedEnvironments>

Source§

impl Combine for Option<PythonVersion>

Source§

impl Combine for Option<DisplaySafeUrl>

Source§

impl Combine for Option<ExcludeNewer>

Source§

impl Combine for Option<ExcludeNewerPackage>

Source§

fn combine(self, other: Self) -> Self

Combine two ExcludeNewerPackage instances by merging them, with the values in self taking precedence.

Source§

impl Combine for Option<ExcludeNewerValue>

Source§

impl Combine for Option<ExtraBuildDependencies>

Source§

fn combine(self, other: Self) -> Self

Source§

impl Combine for Option<FilesystemOptions>

Source§

fn combine(self, other: Self) -> Self

Combine the options used in two FilesystemOptionss. Retains the root of self.

Source§

impl Combine for Option<Options>

Source§

fn combine(self, other: Self) -> Self

Combine the options used in two Optionss. Retains the root of self.

Source§

impl Combine for Option<PipOptions>

Source§

fn combine(self, other: Self) -> Self

Source§

impl Combine for Option<NonZeroUsize>

Source§

impl Combine for IgnoredAny

Source§

fn combine(self, _other: Self) -> Self

Source§

impl Combine for ExtraBuildVariables

Source§

fn combine(self, other: Self) -> Self

Source§

impl Combine for ExcludeNewer

Source§

fn combine(self, other: Self) -> Self

Source§

impl Combine for ExtraBuildDependencies

Source§

fn combine(self, other: Self) -> Self

Source§

impl<K: Ord, T> Combine for Option<BTreeMap<K, Vec<T>>>

Source§

fn combine(self, other: Self) -> Self

Combine two maps of vecs by combining their vecs

Source§

impl<T> Combine for Option<Vec<T>>

Source§

fn combine(self, other: Self) -> Self

Combine two vectors by extending the vector in self with the vector in other, if they’re both Some.

Implementors§