Skip to main content

path_name

Function path_name 

Source
pub fn path_name<'a>(path: &'a Path, what: &str) -> Result<&'a Ident>
Expand description

The struct named by path (e.g. of #[merge_patch(patch = path)]): its last segment.

ยงErrors

Returns an error at the path when it has no segment, naming it what.