[][src]Struct syntex_syntax2::ast::PathSegment

pub struct PathSegment {
    pub identifier: Ident,
    pub span: Span,
    pub parameters: Option<P<PathParameters>>,
}

A segment of a path: an identifier, an optional lifetime, and a set of types.

E.g. std, String or Box<T>

Fields

identifier: Ident

The identifier portion of this path segment.

span: Span

Span of the segment identifier.

parameters: Option<P<PathParameters>>

Type/lifetime parameters attached to this path. They come in two flavors: Path<A,B,C> and Path(A,B) -> C. Note that this is more than just simple syntactic sugar; the use of parens affects the region binding rules, so we preserve the distinction. The Option<P<..>> wrapper is purely a size optimization; None is used to represent both Path and Path<>.

Methods

impl PathSegment[src]

pub fn from_ident(ident: Ident, span: Span) -> Self[src]

pub fn crate_root() -> Self[src]

Trait Implementations

impl PartialEq<PathSegment> for PathSegment[src]

impl Eq for PathSegment[src]

impl Clone for PathSegment[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Hash for PathSegment[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for PathSegment[src]

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

impl Serialize for PathSegment[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]