Trait proc_macro::bridge::Mark

source ·
trait Mark {
    type Unmarked;

    // Required method
    fn mark(unmarked: Self::Unmarked) -> Self;
}
🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
Expand description

Helper to wrap associated types to allow trait impl dispatch. That is, normally a pair of impls for T::Foo and T::Bar can overlap, but if the impls are, instead, on types like Marked<T::Foo, Foo> and Marked<T::Bar, Bar>, they can’t.

Required Associated Types§

source

type Unmarked

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)

Required Methods§

source

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)

Implementations on Foreign Types§

source§

impl<T: Mark> Mark for Bound<T>

§

type Unmarked = Bound<<T as Mark>::Unmarked>

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl<T: Mark> Mark for Range<T>

§

type Unmarked = Range<<T as Mark>::Unmarked>

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl<T: Mark, E: Mark> Mark for Result<T, E>

§

type Unmarked = Result<<T as Mark>::Unmarked, <E as Mark>::Unmarked>

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl Mark for u8

§

type Unmarked = u8

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl Mark for char

§

type Unmarked = char

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl<T: Mark> Mark for Option<T>

§

type Unmarked = Option<<T as Mark>::Unmarked>

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl Mark for bool

§

type Unmarked = bool

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl Mark for ()

§

type Unmarked = ()

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl<T: Mark> Mark for Vec<T>

§

type Unmarked = Vec<<T as Mark>::Unmarked, Global>

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl Mark for String

§

type Unmarked = String

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl Mark for &str

§

type Unmarked = &str

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl Mark for usize

§

type Unmarked = usize

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

impl Mark for &[u8]

§

type Unmarked = &[u8]

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source§

fn mark(unmarked: Self::Unmarked) -> Self

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)

Implementors§

source§

impl Mark for Level

source§

impl Mark for Delimiter

source§

impl Mark for Spacing

source§

impl Mark for LitKind

source§

impl<Sp: Mark, Sy: Mark> Mark for Literal<Sp, Sy>

§

type Unmarked = Literal<<Sp as Mark>::Unmarked, <Sy as Mark>::Unmarked>

source§

impl<Span: Mark> Mark for DelimSpan<Span>

§

type Unmarked = DelimSpan<<Span as Mark>::Unmarked>

source§

impl<Span: Mark> Mark for Diagnostic<Span>

§

type Unmarked = Diagnostic<<Span as Mark>::Unmarked>

source§

impl<Span: Mark> Mark for ExpnGlobals<Span>

§

type Unmarked = ExpnGlobals<<Span as Mark>::Unmarked>

source§

impl<Span: Mark> Mark for Punct<Span>

§

type Unmarked = Punct<<Span as Mark>::Unmarked>

source§

impl<Span: Mark, Symbol: Mark> Mark for Ident<Span, Symbol>

§

type Unmarked = Ident<<Span as Mark>::Unmarked, <Symbol as Mark>::Unmarked>

source§

impl<T, M> Mark for Marked<T, M>

§

type Unmarked = T

source§

impl<TokenStream: Mark, Span: Mark> Mark for Group<TokenStream, Span>

§

type Unmarked = Group<<TokenStream as Mark>::Unmarked, <Span as Mark>::Unmarked>

source§

impl<TokenStream: Mark, Span: Mark, Symbol: Mark> Mark for TokenTree<TokenStream, Span, Symbol>

§

type Unmarked = TokenTree<<TokenStream as Mark>::Unmarked, <Span as Mark>::Unmarked, <Symbol as Mark>::Unmarked>