Skip to main content

luaur_common/methods/
variant_variant_variant.rs

1impl<T0> crate::records::variant::Variant1<T0> {
2    pub fn variant(&mut self) {
3        // C++ `Variant()` default-constructs the first alternative.
4        // In Rust, this is handled by `Default` impl on the enum, which
5        // constructs `Self::V0(T0::default())`. A manual reassignment is
6        // unnecessary and duplicates the derive-based behavior.
7    }
8}
9
10impl<T0, T1> crate::records::variant::Variant2<T0, T1> {
11    pub fn variant(&mut self) {
12        // C++ `Variant()` default-constructs the first alternative.
13        // In Rust, this is handled by `Default` impl on the enum, which
14        // constructs `Self::V0(T0::default())`. A manual reassignment is
15        // unnecessary and duplicates the derive-based behavior.
16    }
17}
18
19impl<T0, T1, T2> crate::records::variant::Variant3<T0, T1, T2> {
20    pub fn variant(&mut self) {
21        // C++ `Variant()` default-constructs the first alternative.
22        // In Rust, this is handled by `Default` impl on the enum, which
23        // constructs `Self::V0(T0::default())`. A manual reassignment is
24        // unnecessary and duplicates the derive-based behavior.
25    }
26}
27
28impl<T0, T1, T2, T3> crate::records::variant::Variant4<T0, T1, T2, T3> {
29    pub fn variant(&mut self) {
30        // C++ `Variant()` default-constructs the first alternative.
31        // In Rust, this is handled by `Default` impl on the enum, which
32        // constructs `Self::V0(T0::default())`. A manual reassignment is
33        // unnecessary and duplicates the derive-based behavior.
34    }
35}
36
37impl<T0, T1, T2, T3, T4> crate::records::variant::Variant5<T0, T1, T2, T3, T4> {
38    pub fn variant(&mut self) {
39        // C++ `Variant()` default-constructs the first alternative.
40        // In Rust, this is handled by `Default` impl on the enum, which
41        // constructs `Self::V0(T0::default())`. A manual reassignment is
42        // unnecessary and duplicates the derive-based behavior.
43    }
44}
45
46impl<T0, T1, T2, T3, T4, T5> crate::records::variant::Variant6<T0, T1, T2, T3, T4, T5> {
47    pub fn variant(&mut self) {
48        // C++ `Variant()` default-constructs the first alternative.
49        // In Rust, this is handled by `Default` impl on the enum, which
50        // constructs `Self::V0(T0::default())`. A manual reassignment is
51        // unnecessary and duplicates the derive-based behavior.
52    }
53}
54
55impl<T0, T1, T2, T3, T4, T5, T6> crate::records::variant::Variant7<T0, T1, T2, T3, T4, T5, T6> {
56    pub fn variant(&mut self) {
57        // C++ `Variant()` default-constructs the first alternative.
58        // In Rust, this is handled by `Default` impl on the enum, which
59        // constructs `Self::V0(T0::default())`. A manual reassignment is
60        // unnecessary and duplicates the derive-based behavior.
61    }
62}