pub trait Combine {
// Required method
fn combine(self, other: Self) -> Self;
}Required Methods§
Sourcefn combine(self, other: Self) -> Self
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>
impl Combine for Option<KeyringProviderType>
fn combine( self, other: Option<KeyringProviderType>, ) -> Option<KeyringProviderType>
Source§impl Combine for Option<IndexStrategy>
impl Combine for Option<IndexStrategy>
fn combine(self, other: Option<IndexStrategy>) -> Option<IndexStrategy>
Source§impl Combine for Option<ExportFormat>
impl Combine for Option<ExportFormat>
fn combine(self, other: Option<ExportFormat>) -> Option<ExportFormat>
Source§impl Combine for Option<TargetTriple>
impl Combine for Option<TargetTriple>
fn combine(self, other: Option<TargetTriple>) -> Option<TargetTriple>
Source§impl Combine for Option<TrustedPublishing>
impl Combine for Option<TrustedPublishing>
fn combine(self, other: Option<TrustedPublishing>) -> Option<TrustedPublishing>
Source§impl Combine for Option<PythonDownloads>
impl Combine for Option<PythonDownloads>
fn combine(self, other: Option<PythonDownloads>) -> Option<PythonDownloads>
Source§impl Combine for Option<PythonPreference>
impl Combine for Option<PythonPreference>
fn combine(self, other: Option<PythonPreference>) -> Option<PythonPreference>
Source§impl Combine for Option<ForkStrategy>
impl Combine for Option<ForkStrategy>
fn combine(self, other: Option<ForkStrategy>) -> Option<ForkStrategy>
Source§impl Combine for Option<PrereleaseMode>
impl Combine for Option<PrereleaseMode>
fn combine(self, other: Option<PrereleaseMode>) -> Option<PrereleaseMode>
Source§impl Combine for Option<AnnotationStyle>
impl Combine for Option<AnnotationStyle>
fn combine(self, other: Option<AnnotationStyle>) -> Option<AnnotationStyle>
Source§impl Combine for Option<ResolutionMode>
impl Combine for Option<ResolutionMode>
fn combine(self, other: Option<ResolutionMode>) -> Option<ResolutionMode>
Source§impl Combine for Option<AddBoundsKind>
impl Combine for Option<AddBoundsKind>
fn combine(self, other: Option<AddBoundsKind>) -> Option<AddBoundsKind>
Source§impl Combine for Option<RequiredVersion>
impl Combine for Option<RequiredVersion>
fn combine(self, other: Option<RequiredVersion>) -> Option<RequiredVersion>
Source§impl Combine for Option<ConfigSettings>
impl Combine for Option<ConfigSettings>
Source§impl Combine for Option<PackageConfigSettings>
impl Combine for Option<PackageConfigSettings>
Source§impl Combine for Option<PipExtraIndex>
impl Combine for Option<PipExtraIndex>
fn combine(self, other: Option<PipExtraIndex>) -> Option<PipExtraIndex>
Source§impl Combine for Option<PipFindLinks>
impl Combine for Option<PipFindLinks>
fn combine(self, other: Option<PipFindLinks>) -> Option<PipFindLinks>
Source§impl Combine for Option<SchemaConflicts>
impl Combine for Option<SchemaConflicts>
fn combine(self, other: Option<SchemaConflicts>) -> Option<SchemaConflicts>
Source§impl Combine for Option<SupportedEnvironments>
impl Combine for Option<SupportedEnvironments>
fn combine( self, other: Option<SupportedEnvironments>, ) -> Option<SupportedEnvironments>
Source§impl Combine for Option<PythonVersion>
impl Combine for Option<PythonVersion>
fn combine(self, other: Option<PythonVersion>) -> Option<PythonVersion>
Source§impl Combine for Option<DisplaySafeUrl>
impl Combine for Option<DisplaySafeUrl>
fn combine(self, other: Option<DisplaySafeUrl>) -> Option<DisplaySafeUrl>
Source§impl Combine for Option<ExcludeNewer>
impl Combine for Option<ExcludeNewer>
fn combine(self, other: Option<ExcludeNewer>) -> Option<ExcludeNewer>
Source§impl Combine for Option<ExcludeNewerPackage>
impl Combine for Option<ExcludeNewerPackage>
Source§fn combine(self, other: Self) -> Self
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>
impl Combine for Option<ExcludeNewerValue>
fn combine(self, other: Option<ExcludeNewerValue>) -> Option<ExcludeNewerValue>
Source§impl Combine for Option<FilesystemOptions>
impl Combine for Option<FilesystemOptions>
Source§fn combine(self, other: Self) -> Self
fn combine(self, other: Self) -> Self
Combine the options used in two FilesystemOptionss. Retains the root of self.