pretend-codegen 0.4.0

codegen for pretend.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use quote::ToTokens;

pub(crate) struct WithTokens<'a, V, T>
where
    T: ToTokens,
{
    pub(crate) value: V,
    pub(crate) tokens: &'a T,
}

impl<'a, V, T> WithTokens<'a, V, T>
where
    T: ToTokens,
{
    pub(crate) fn new(value: V, tokens: &'a T) -> Self {
        WithTokens { value, tokens }
    }
}