Skip to main content

segments

Function segments 

Source
pub fn segments(document: &IndexedDocument<'_>, path: &BlockPath) -> Vec<String>
Expand description

The path’s names, outermost first. Every segment is a block the path descended into — the document root is the unnamed scope they hang from, so it contributes nothing and the empty path (the root itself) has no segments at all.

The segments rather than the joined string: the printed sheet links each ancestor segment to that ancestor’s page, so it needs to know where one name ends and the next begins.