[][src]Enum runestick::Component

pub enum Component {
    Str(Box<str>),
    Id(usize),
}

The component of an item.

All indexes refer to sibling indexes. So two sibling id components could have the indexes 1 and 2 respectively.

Variants

Str(Box<str>)

A regular string component.

Id(usize)

A nested anonymous part with an identifier.

Implementations

impl Component[src]

pub fn id(&self) -> Option<usize>[src]

Get the identifier of the component.

pub fn as_component_ref(&self) -> ComponentRef<'_>[src]

Convert into component reference.

Trait Implementations

impl Clone for Component[src]

impl Debug for Component[src]

impl<'de> Deserialize<'de> for Component[src]

impl Display for Component[src]

impl Eq for Component[src]

impl Hash for Component[src]

impl IntoComponent for Component[src]

impl<'_> IntoComponent for &'_ Component[src]

impl Ord for Component[src]

impl PartialEq<Component> for Component[src]

impl PartialOrd<Component> for Component[src]

impl Serialize for Component[src]

impl StructuralEq for Component[src]

impl StructuralPartialEq for Component[src]

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<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.