[][src]Struct syn::PathTokens

pub struct PathTokens<'a>(pub &'a Option<QSelf>, pub &'a Path);

A helper for printing a self-type qualified path as tokens.

extern crate syn;
extern crate quote;

use syn::{QSelf, Path, PathTokens};
use quote::{Tokens, ToTokens};

struct MyNode {
    qself: Option<QSelf>,
    path: Path,
}

impl ToTokens for MyNode {
    fn to_tokens(&self, tokens: &mut Tokens) {
        PathTokens(&self.qself, &self.path).to_tokens(tokens);
    }
}

This type is available if Syn is built with the "derive" or "full" feature and the "printing" feature.

Trait Implementations

impl<'a> Clone for PathTokens<'a>[src]

impl<'a> ToTokens for PathTokens<'a>[src]

Auto Trait Implementations

impl<'a> !Send for PathTokens<'a>

impl<'a> Unpin for PathTokens<'a>

impl<'a> !Sync for PathTokens<'a>

impl<'a> UnwindSafe for PathTokens<'a>

impl<'a> RefUnwindSafe for PathTokens<'a>

Blanket Implementations

impl<T> Spanned for T where
    T: ToTokens
[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for 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]