[][src]Struct tydi::PathName

pub struct PathName(_);

Type-safe path for names.

Allows wrapping a set of valid names in a hierarchy.

Methods

impl PathName[src]

pub fn new(names: impl Iterator<Item = Name>) -> Self[src]

pub fn try_new(
    names: impl IntoIterator<Item = impl TryInto<Name, Error = Error>>
) -> Result<Self>
[src]

pub fn is_empty(&self) -> bool[src]

Returns true if this PathName is empty (∅).

pub fn push(&mut self, name: impl Into<Name>)[src]

pub fn len(&self) -> usize[src]

pub fn last(&self) -> Option<&Name>[src]

pub fn parent(&self) -> Option<PathName>[src]

Trait Implementations

impl Clone for PathName[src]

impl Debug for PathName[src]

impl Display for PathName[src]

impl Eq for PathName[src]

impl From<Name> for PathName[src]

impl FromIterator<Name> for PathName[src]

impl Hash for PathName[src]

impl<'a> IntoIterator for &'a PathName[src]

type Item = &'a Name

The type of the elements being iterated over.

type IntoIter = Iter<'a, Name>

Which kind of iterator are we turning this into?

impl Ord for PathName[src]

impl PartialEq<PathName> for PathName[src]

impl PartialOrd<PathName> for PathName[src]

impl StructuralEq for PathName[src]

impl StructuralPartialEq for PathName[src]

impl<'_> TryFrom<&'_ str> for PathName[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<String> for PathName[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.