Skip to main content

Path

Trait Path 

Source
pub trait Path: Sized {
    // Required method
    fn parse(capture: Capture<'_>) -> Result<Self, Error>;

    // Provided method
    fn try_parse(path: &Target<'_>, range: Range<usize>) -> Result<Self, Error> { ... }
}

Required Methods§

Source

fn parse(capture: Capture<'_>) -> Result<Self, Error>

Provided Methods§

Source

fn try_parse(path: &Target<'_>, range: Range<usize>) -> Result<Self, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Path for bool

Source§

fn parse(capture: Capture<'_>) -> Result<Self, Error>

Source§

impl Path for u64

Source§

fn parse(capture: Capture<'_>) -> Result<Self, Error>

Source§

impl Path for usize

Source§

fn parse(capture: Capture<'_>) -> Result<Self, Error>

Implementors§