liveBook · Manning

Absolute path

An absolute path is a Rust path that identifies an item from a crate or other root namespace through complete namespace qualification.

How 2 Manning books explain it

Refactoring to Rust

An absolute path is a Rust path resolved from a crate or other root namespace.

How it is used
Accesses items across nested Rust modules from a crate root.
How deep it goes
Explains crate roots, crate, pub, and use through parallel module examples, but stops short of deeper namespace mechanics.
Examples
Uses std::io::stdin, a libsnack module tree, lifecycle functions, and use crate declarations.
What you can do after
Apply it via Rust module paths to reference current-crate and external-crate items.

Read how Refactoring to Rust explains absolute path →

Write Powerful Rust Macros

A full path is a Rust path that identifies an item through its complete namespace qualification.

How it is used
Uses complete namespace qualification to make Rust macro-generated code independent of caller imports and names.
How deep it goes
Explains missing imports, name collisions, and implementation hiding, then demonstrates qualified types and trait bounds in generated code.
Examples
Demonstrates std::collections::HashMap, core::default::Default, quote!, quote_spanned!, and compiler errors from unresolved or colliding names.
What you can do after
Build it from scratch by qualifying dependencies in generated Rust code and reducing import, collision, and implementation-hiding problems.

Read how Write Powerful Rust Macros explains absolute path →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.