pub struct Dependency {
pub alias: String,
pub path: Vec<String>,
pub external: bool,
}Expand description
One dependency of a subcrate, as written in #[subcrate(...)].
Fields§
§alias: StringThe name the dependency is visible under inside the subcrate: the explicit
alias = …, or else the last segment of path. (The build helper imports
the dependency’s crate under this name at the subcrate’s crate root.)
path: Vec<String>The module path of the depended-on subcrate, from its crate root, with
any leading crate removed (e.g. ["nested", "inner"]). For an
external crate this is the crate’s path after the leading ::.
external: booltrue for a leading-:: path naming an external crate: one the owning
package depends on, or the owner crate itself. (The build helper accepts
just the crate’s name, not a path into it.)
Implementations§
Source§impl Dependency
impl Dependency
Sourcepub fn path_display(&self) -> String
pub fn path_display(&self) -> String
The dependency’s path as written, e.g. nested::inner or ::serde.
Trait Implementations§
Source§impl Clone for Dependency
impl Clone for Dependency
Source§impl Debug for Dependency
impl Debug for Dependency
impl Eq for Dependency
Source§impl PartialEq for Dependency
impl PartialEq for Dependency
impl StructuralPartialEq for Dependency
Auto Trait Implementations§
impl Forget for Dependency
impl Freeze for Dependency
impl Move for Dependency
impl RefUnwindSafe for Dependency
impl Send for Dependency
impl Sync for Dependency
impl Unpin for Dependency
impl UnsafeUnpin for Dependency
impl UnwindSafe for Dependency
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