[−][src]Struct guppy::graph::PackageLink
Represents a dependency from one package to another.
This struct contains information about:
- whether this dependency was renamed in the context of this crate.
- if this is a normal, dev and/or build dependency.
- platform-specific information about required, optional and status
Implementations
impl<'g> PackageLink<'g>
[src]
pub fn from(&self) -> PackageMetadata<'g>
[src]
Returns the package which depends on the to
package.
pub fn to(&self) -> PackageMetadata<'g>
[src]
Returns the package which is depended on by the from
package.
pub fn endpoints(&self) -> (PackageMetadata<'g>, PackageMetadata<'g>)
[src]
Returns the endpoints as a pair of packages (from, to)
.
pub fn dep_name(&self) -> &'g str
[src]
Returns the name for this dependency edge. This can be affected by a crate rename.
pub fn resolved_name(&self) -> &'g str
[src]
Returns the resolved name for this dependency edge. This may involve renaming the crate and replacing - with _.
pub fn version_req(&self) -> &'g VersionReq
[src]
Returns the semver requirements specified for this dependency.
To get the resolved version, see the to
field of the PackageLink
this was part of.
Notes
A dependency can be requested multiple times, possibly with different version requirements,
even if they all end up resolving to the same version. version_req
will return any of
those requirements.
See Specifying Dependencies in the Cargo reference for more details.
pub fn normal(&self) -> DependencyReq<'g>
[src]
Returns details about this dependency from the [dependencies]
section.
pub fn build(&self) -> DependencyReq<'g>
[src]
Returns details about this dependency from the [build-dependencies]
section.
pub fn dev(&self) -> DependencyReq<'g>
[src]
Returns details about this dependency from the [dev-dependencies]
section.
pub fn req_for_kind(&self, kind: DependencyKind) -> DependencyReq<'g>
[src]
Returns details about this dependency from the section specified by the given dependency kind.
pub fn dev_only(&self) -> bool
[src]
Return true if this edge is dev-only, i.e. code from this edge will not be included in normal builds.
Trait Implementations
impl<'g> Clone for PackageLink<'g>
[src]
pub fn clone(&self) -> PackageLink<'g>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'g> Copy for PackageLink<'g>
[src]
impl<'g> Debug for PackageLink<'g>
[src]
Auto Trait Implementations
impl<'g> RefUnwindSafe for PackageLink<'g>
impl<'g> Send for PackageLink<'g>
impl<'g> Sync for PackageLink<'g>
impl<'g> Unpin for PackageLink<'g>
impl<'g> UnwindSafe for PackageLink<'g>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Clone + Send + Sync,
[src]
T: 'a + Clone + Send + Sync,
pub fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a, Global>
[src]
pub fn self_address_mut(&mut self) -> *mut ()
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
[src]
T: 'a + Clone,
pub fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a, Global>
[src]
pub fn self_address_mut(&mut self) -> *mut ()
[src]
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> SafeBorrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_replacement(ptr: &T) -> &T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,