1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use prelude::*;

/// An example type which uses a Const-parameter and allows extension methods.
#[derive(ConstConstructor)]
#[cconstructor(
    Type = "ConstUserExtMeth",
    ConstParam = "C",
    extension_methods = "true",
)]
pub struct ConstUserExtMethInner<C> {
    #[allow(dead_code)]
    const_: PhantomWrapper<C>,
}

impl<C> ConstUserExtMeth<C> {
    pub fn new() -> Self {
        Self {
            const_: PhantomWrapper::NEW,
        }
    }
}

////////////////////////////////////////////////////////