pub struct VisitedSet { /* private fields */ }Expand description
Tracks visited items with version-aware lookup for DFS traversal.
Implementations§
Source§impl VisitedSet
impl VisitedSet
pub fn new() -> Self
Sourcepub fn check_version(
&self,
package: &SourceName,
item: &ItemName,
constraint: &VersionConstraint,
) -> VersionCheckResult
pub fn check_version( &self, package: &SourceName, item: &ItemName, constraint: &VersionConstraint, ) -> VersionCheckResult
Check whether an item was visited and compare version constraints.
Sourcepub fn insert(
&mut self,
package: SourceName,
item: ItemName,
constraint: VersionConstraint,
resolved_ref: ResolvedRef,
)
pub fn insert( &mut self, package: SourceName, item: ItemName, constraint: VersionConstraint, resolved_ref: ResolvedRef, )
Insert an item as visited.
Sourcepub fn iter(
&self,
) -> impl Iterator<Item = (&(SourceName, ItemName), &ResolvedVersion)>
pub fn iter( &self, ) -> impl Iterator<Item = (&(SourceName, ItemName), &ResolvedVersion)>
Iterate all visited items for graph/output assembly.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VisitedSet
impl RefUnwindSafe for VisitedSet
impl Send for VisitedSet
impl Sync for VisitedSet
impl Unpin for VisitedSet
impl UnsafeUnpin for VisitedSet
impl UnwindSafe for VisitedSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more