pub trait PackageIdSpecQuery {
// Required methods
fn query_str<I>(spec: &str, i: I) -> CargoResult<PackageId>
where I: IntoIterator<Item = PackageId>;
fn matches(&self, package_id: PackageId) -> bool;
fn query<I>(&self, i: I) -> CargoResult<PackageId>
where I: IntoIterator<Item = PackageId>;
}
Required Methods§
Sourcefn query_str<I>(spec: &str, i: I) -> CargoResult<PackageId>where
I: IntoIterator<Item = PackageId>,
fn query_str<I>(spec: &str, i: I) -> CargoResult<PackageId>where
I: IntoIterator<Item = PackageId>,
Roughly equivalent to PackageIdSpec::parse(spec)?.query(i)
Sourcefn matches(&self, package_id: PackageId) -> bool
fn matches(&self, package_id: PackageId) -> bool
Checks whether the given PackageId
matches the PackageIdSpec
.
Sourcefn query<I>(&self, i: I) -> CargoResult<PackageId>where
I: IntoIterator<Item = PackageId>,
fn query<I>(&self, i: I) -> CargoResult<PackageId>where
I: IntoIterator<Item = PackageId>,
Checks a list of PackageId
s to find 1 that matches this PackageIdSpec
. If 0, 2, or
more are found, then this returns an error.
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.