Skip to content

struct

Path

pub struct Path(/* private */);

A dotted reference into the component scope, e.g. todo.title.

Methods

parse

pub fn parse(s: &str) -> Option<Path>

Parse a.b.c. Each segment starts with a letter or _ and continues with letters, digits, _ or -.

from_segments

pub fn from_segments(segments: Vec<String>) -> Path

Build a path from already-validated segments.

segments

pub fn segments(&self) -> &[String]

The path's parts: post.author.name is post, author, name.

head

pub fn head(&self) -> &str

The first segment — the name looked up in the scope.

Trait implementations