Enum guppy::graph::PackageSource [−][src]
Expand description
The source of a package.
This enum contains information about where a package is found, and whether it is inside or outside the workspace.
Variants
Workspace(&'g Utf8Path)
Tuple Fields
0: &'g Utf8PathThis package is in the workspace.
The path is relative to the workspace root.
Path(&'g Utf8Path)
Tuple Fields
0: &'g Utf8PathThis package is a path dependency that isn’t in the workspace.
The path is relative to the workspace root.
External(&'g str)
Tuple Fields
0: &'g strThis package is an external dependency.
- For packages retrieved from
crates.io, the source is the string"registry+https://github.com/rust-lang/crates.io-index". - For packages retrieved from other registries, the source begins with
"registry+". - For packages retrieved from Git repositories, the source begins with
"git+".
Implementations
The path to the crates.io registry.
Returns true if this package source represents a workspace.
Returns true if this package source represents a path dependency that isn’t in the workspace.
Returns true if this package source represents an external dependency.
Returns true if the source is crates.io.
Returns true if this package is a local dependency, i.e. either in the workspace or a local path.
Returns the path if this is a workspace dependency, or None if this is a non-workspace
dependency.
The path is relative to the workspace root.
Returns the local path if this is a local dependency, or None if it is an external
dependency.
The path is relative to the workspace root.
Returns the external source if this is an external dependency, or None if it is a local
dependency.
Attempts to parse an external source.
Returns None if the external dependency could not be recognized, or if it is a local
dependency.
For more about external sources, see the documentation for ExternalSource.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl<'g> RefUnwindSafe for PackageSource<'g>
impl<'g> Send for PackageSource<'g>
impl<'g> Sync for PackageSource<'g>
impl<'g> Unpin for PackageSource<'g>
impl<'g> UnwindSafe for PackageSource<'g>
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.