Trait is_tree::traits::has_relative::HasRelative

source ·
pub trait HasRelative<'a>: Sized {
    // Provided method
    fn relative<K>(&'a self, path: impl IntoIterator<Item = K>) -> Option<Self>
       where K: Into<String>,
             Self: Clone + HasRoot + HasParent + HasPathSegment,
             &'a Self: HasBranches<Self> { ... }
}
Expand description

A trait for objects that have a relative path.

Provided Methods§

source

fn relative<K>(&'a self, path: impl IntoIterator<Item = K>) -> Option<Self>

Gets a relative path. “self”, “root”, and “super” are reserved path segments. “self” is the current object, “root” is the root object, and “super” is the parent object.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, T: Sized> HasRelative<'a> for T