Struct rasslib::tree::Path
[−]
[src]
pub struct Path<T> where T: Display + Clone {
// some fields omitted
}
Represents a path to a specific element in the tree structure. Not that
parameter T
shall be of the same type as for the corresponding Tree<T>
.
Methods
impl<'a, T> Path<T> where T: Display + Clone
fn from(elements: Vec<T>) -> Path<T>
Creates a new Path<T>
based on the given elements. Note that the takes
ownership of the provided elements
.
fn to_string(&self) -> String
Returns the string representation of a Path<T>
.
fn is_leaf(&self) -> bool
Returns true is the path is a leaf of the tree, otherwise false.
Trait Implementations
impl<'a, T> Display for Path<T> where T: Display + Clone
std::fmt::Display
trait implementation of a Path<T>
.