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.
Object Safety§
This trait is not object safe.