Trait HasRelative

Source
pub trait HasRelative<'a> {
    // Provided method
    fn relative<K>(&'a self, path: impl IntoIterator<Item = K>) -> Option<Self>
       where K: Into<String>,
             Self: KnowsVisitor<Visitor = 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>
where K: Into<String>, Self: KnowsVisitor<Visitor = Self> + Clone + HasRoot + HasParent + HasPathSegment, &'a Self: HasBranches<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.

Implementors§

Source§

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