Struct is_tree::path::Path

source ·
pub struct Path {
    pub segments: Vec<String>,
}

Fields§

§segments: Vec<String>

Implementations§

source§

impl Path

source

pub fn join(&self, segment: impl Into<String>) -> Path

Trait Implementations§

source§

impl Clone for Path

source§

fn clone(&self) -> Path

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Path

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Path

source§

fn default() -> Path

Returns the “default value” for a type. Read more
source§

impl Display for Path

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<&[&str]> for Path

source§

fn from(value: &[&str]) -> Path

Converts to this type from the input type.
source§

impl From<&[String]> for Path

source§

fn from(value: &[String]) -> Path

Converts to this type from the input type.
source§

impl<'a> From<&'a str> for Path

source§

fn from(value: &'a str) -> Self

Converts to this type from the input type.
source§

impl From<Vec<&str>> for Path

source§

fn from(value: Vec<&str>) -> Path

Converts to this type from the input type.
source§

impl From<Vec<String>> for Path

source§

fn from(value: Vec<String>) -> Path

Converts to this type from the input type.
source§

impl PartialEq for Path

source§

fn eq(&self, other: &Path) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Path

Auto Trait Implementations§

§

impl Freeze for Path

§

impl RefUnwindSafe for Path

§

impl Send for Path

§

impl Sync for Path

§

impl Unpin for Path

§

impl UnwindSafe for Path

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> HasBranchesAPI for T

source§

fn branches_impl2<T>(self) -> impl Iterator<Item = T>
where Self: HasBranches<T> + Sized,

This is used internally. Should use branches instead.
source§

impl<'a, T> HasBranchesAPIV2<'a> for T

source§

fn branches<T>(&'a self) -> impl Iterator<Item = T>
where &'a Self: HasBranches<T>, T: 'a,

Iterates over the branches of a type.
source§

fn branches_mut<T>(&'a mut self) -> impl Iterator<Item = T>
where &'a mut Self: HasBranches<T>, T: 'a,

Iterates over the branches of a type mutably.
source§

impl<T> HasGet for T

source§

fn get_impl<T>(self, segment: impl Into<String>) -> Option<T>
where Self: HasBranches<T> + Sized, T: HasPathSegment,

Gets a branch by its path segment. It’s discouraged to use this method directly. Instead, use the get and get_mut method from the HasGetAPI trait.
source§

impl<'a, T> HasGetAPI<'a> for T

source§

fn get<T>(&'a self, segment: impl Into<String>) -> Option<T>

Gets a branch by its path segment.
source§

fn get_mut<T>(&'a mut self, segment: impl Into<String>) -> Option<T>

Gets a branch by its path segment mutably.
source§

fn branch<T>(&'a mut self, segment: impl Into<String>) -> &'a mut T

source§

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

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.
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<'a, T> UnsafeHasRelative<'a> for T

source§

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

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