[][src]Trait synstructure::MacroResult

pub trait MacroResult {
    fn into_result(self) -> Result<TokenStream>;

    fn into_stream(self) -> TokenStream
    where
        Self: Sized
, { ... } }

Helper trait describing values which may be returned by macro implementation methods used by this crate's macros.

Required methods

fn into_result(self) -> Result<TokenStream>

Convert this result into a Result for further processing / validation.

Loading content...

Provided methods

fn into_stream(self) -> TokenStream where
    Self: Sized

Convert this result into a proc_macro::TokenStream, ready to return from a native proc_macro implementation.

If into_result() would return an Err, this method should instead generate a compile_error! invocation to nicely report the error.

This method is available if synstructure is built with the "proc-macro" feature.

Loading content...

Implementations on Foreign Types

impl MacroResult for TokenStream[src]

impl MacroResult for TokenStream[src]

impl<T: MacroResult> MacroResult for Result<T>[src]

Loading content...

Implementors

Loading content...