ToTokensPunctComposable

Trait ToTokensPunctComposable 

Source
pub trait ToTokensPunctComposable {
    // Required method
    fn to_tokens_punct_composable(&self, out: &mut TokenStream);
}
Expand description

Convert to a token stream in a way that composes nicely

Required Methods§

Implementations on Foreign Types§

Source§

impl<P> ToTokensPunctComposable for Option<&&P>
where P: ToTokens + Default,

Ensure that something is output, for punctuation P

Implemented for Option<&&P> because that’s what you get from Punctuated::pairs().next().punct().

Implementors§

Source§

impl<T, P> ToTokensPunctComposable for Punctuated<T, P>
where T: ToTokens, P: ToTokens + Default,

Ensure that there is a trailing punctuation if needed