Struct IdPath

Source
pub struct IdPath(/* private fields */);
Expand description

A borrowed path of ids.

Implementations§

Source§

impl IdPath

Source

pub fn root() -> &'static Self

Source

pub fn is_root(&self) -> bool

Source

pub fn head(&self) -> Option<Id>

Source

pub fn tail(&self) -> &Self

Source

pub fn child(&self, id: impl Into<Id>) -> IdPathBuf

Source

pub fn join(&self, path: &IdPath) -> IdPathBuf

Trait Implementations§

Source§

impl AsRef<IdPath> for IdPathBuf

Source§

fn as_ref(&self) -> &IdPath

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<IdPath> for IdPathBuf

Source§

fn borrow(&self) -> &IdPath

Immutably borrows from an owned value. Read more
Source§

impl Debug for IdPath

Source§

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

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

impl From<&IdPath> for IdPathBuf

Source§

fn from(id_path: &IdPath) -> Self

Converts to this type from the input type.
Source§

impl Hash for IdPath

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
Source§

impl PartialEq for IdPath

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl RefCast for IdPath

Source§

type From = [Id]

Source§

fn ref_cast(_from: &Self::From) -> &Self

Source§

fn ref_cast_mut(_from: &mut Self::From) -> &mut Self

Source§

impl ToOwned for IdPath

Source§

type Owned = IdPathBuf

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> IdPathBuf

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§

fn clone_into(&self, target: &mut Self::Owned)

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

impl Eq for IdPath

Source§

impl StructuralPartialEq for IdPath

Auto Trait Implementations§

§

impl Freeze for IdPath

§

impl RefUnwindSafe for IdPath

§

impl Send for IdPath

§

impl !Sized for IdPath

§

impl Sync for IdPath

§

impl Unpin for IdPath

§

impl UnwindSafe for IdPath

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