pub trait Target: Clone + Debug + Eq + 'static {
    // Required methods
    fn render_self_into(&self, path: &mut Vec<String>);
    fn render_path_into(&self, path: &mut Vec<String>);
    fn parse_path(path: &[&str]) -> Option<Self>;

    // Provided methods
    fn render_self(&self) -> Vec<String> { ... }
    fn render_path(&self) -> Vec<String> { ... }
}
Expand description

A target for used by a router.

Required Methods§

source

fn render_self_into(&self, path: &mut Vec<String>)

Render only our own path component.

source

fn render_path_into(&self, path: &mut Vec<String>)

Render the full path downwards.

source

fn parse_path(path: &[&str]) -> Option<Self>

Parse the target from the provided (segmented) path.

The path will be the local path, with the prefix already removed.

Provided Methods§

source

fn render_self(&self) -> Vec<String>

Render only our path segment.

source

fn render_path(&self) -> Vec<String>

Render the full path, including our children.

Object Safety§

This trait is not object safe.

Implementors§