pub struct RustResolutionSnapshot { /* private fields */ }Expand description
One root target, the dependency library units it resolves against, and the shared source store all of them read from.
Implementations§
Source§impl RustResolutionSnapshot
impl RustResolutionSnapshot
Sourcepub fn root(&self) -> &Path
pub fn root(&self) -> &Path
The canonical repository root this snapshot was taken beneath.
Every path a snapshot or a report states is relative to it.
Sourcepub fn root_target(&self) -> TargetId
pub fn root_target(&self) -> TargetId
The target this snapshot was requested for.
Sourcepub fn root_unit(&self) -> RustSnapshotUnitId
pub fn root_unit(&self) -> RustSnapshotUnitId
The unit that compiles the requested target.
Sourcepub fn limits(&self) -> ResolutionLimits
pub fn limits(&self) -> ResolutionLimits
The ceilings the project this snapshot came from was loaded under.
Sourcepub fn units(&self) -> &[RustResolutionUnit]
pub fn units(&self) -> &[RustResolutionUnit]
Every selected unit, ordered by manifest path, target kind, then name.
Sourcepub fn unit(&self, id: RustSnapshotUnitId) -> Option<&RustResolutionUnit>
pub fn unit(&self, id: RustSnapshotUnitId) -> Option<&RustResolutionUnit>
The unit one snapshot-local identity selects.
Sourcepub fn edges(&self) -> &[RustSnapshotEdge]
pub fn edges(&self) -> &[RustSnapshotEdge]
Every selected Cargo edge, ordered by source unit, kind, then name.
Sourcepub fn sources(&self) -> &[RustSource]
pub fn sources(&self) -> &[RustSource]
Every distinct source across all units, sorted by path.
Sourcepub fn warnings(&self) -> &[RustResolutionWarning]
pub fn warnings(&self) -> &[RustResolutionWarning]
Non-fatal project-layout diagnostics discovered while walking this snapshot’s complete source closures.
Sourcepub fn source(&self, path: &str) -> Option<&RustSource>
pub fn source(&self, path: &str) -> Option<&RustSource>
The source at one repository-relative path.
Trait Implementations§
Auto Trait Implementations§
impl !Send for RustResolutionSnapshot
impl !Sync for RustResolutionSnapshot
impl Freeze for RustResolutionSnapshot
impl RefUnwindSafe for RustResolutionSnapshot
impl Unpin for RustResolutionSnapshot
impl UnsafeUnpin for RustResolutionSnapshot
impl UnwindSafe for RustResolutionSnapshot
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
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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