1 2 3 4 5 6 7 8 9 10 11
pub struct Defaulted<const N: usize=3>; impl Defaulted { pub fn new() -> Self { Defaulted } } impl<const N: usize> Defaulted<N> { pub fn value(&self) -> usize { N } }