Term
A term represents a statement about a package that may be true or false.
Term.swift:14struct Term
Citizens in PackageGraph
Conformances
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.
Types
Type members
init(DependencyResolutionNode, VersionSetSpecifier
) init(node: DependencyResolutionNode, requirement: VersionSetSpecifier, isPositive: Bool
) init(not: DependencyResolutionNode, VersionSetSpecifier
) Create a new negative term.
Instance members
var description: String
var inverse: Term
The same term with an inversed
isPositive
value.let isPositive: Bool
let node: DependencyResolutionNode
let requirement: VersionSetSpecifier
var supportsPrereleases: Bool
func difference(with: Term
) -> Term? func intersect(with: Term
) -> Term? Create an intersection with another term.
func intersect(withRequirement: VersionSetSpecifier, andPolarity: Bool
) -> Term? Create an intersection with a requirement and polarity returning a new term which represents the version constraints allowed by both the current and given term.
func isValidDecision(for: PartialSolution
) -> Bool Verify if the term fulfills all requirements to be a valid choice for making a decision in the given partial solution.
func relation(with: Term
) -> SetRelation func satisfies(Term
) -> Bool Check if this term satisfies another term, e.g. if
self
is true,other
must also be true.
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.