pub enum Or9<T1, T2, T3, T4, T5, T6, T7, T8, T9> {
T1(T1),
T2(T2),
T3(T3),
T4(T4),
T5(T5),
T6(T6),
T7(T7),
T8(T8),
T9(T9),
}
Expand description
Or9
is an enum representing a value that can be either of 9 types, T1 … T9.
Variants§
Implementations§
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> Or9<T1, T2, T3, T4, T5, T6, T7, T8, T9>
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> Or9<T1, T2, T3, T4, T5, T6, T7, T8, T9>
Sourcepub fn as_t1(self) -> Option<T1>
pub fn as_t1(self) -> Option<T1>
Converts the enum to an Option containing the T1 value, if it is of type T1.
Sourcepub fn as_t2(self) -> Option<T2>
pub fn as_t2(self) -> Option<T2>
Converts the enum to an Option containing the T2 value, if it is of type T2.
Sourcepub fn as_t3(self) -> Option<T3>
pub fn as_t3(self) -> Option<T3>
Converts the enum to an Option containing the T3 value, if it is of type T3.
Sourcepub fn as_t4(self) -> Option<T4>
pub fn as_t4(self) -> Option<T4>
Converts the enum to an Option containing the T4 value, if it is of type T4.
Sourcepub fn as_t5(self) -> Option<T5>
pub fn as_t5(self) -> Option<T5>
Converts the enum to an Option containing the T5 value, if it is of type T5.
Sourcepub fn as_t6(self) -> Option<T6>
pub fn as_t6(self) -> Option<T6>
Converts the enum to an Option containing the T6 value, if it is of type T6.
Sourcepub fn as_t7(self) -> Option<T7>
pub fn as_t7(self) -> Option<T7>
Converts the enum to an Option containing the T7 value, if it is of type T7.
Sourcepub fn as_t8(self) -> Option<T8>
pub fn as_t8(self) -> Option<T8>
Converts the enum to an Option containing the T8 value, if it is of type T8.
Sourcepub fn as_t9(self) -> Option<T9>
pub fn as_t9(self) -> Option<T9>
Converts the enum to an Option containing the T9 value, if it is of type T9.
Sourcepub fn map_t1<F, B>(self, f: F) -> Or9<B, T2, T3, T4, T5, T6, T7, T8, T9>where
F: FnOnce(T1) -> B,
pub fn map_t1<F, B>(self, f: F) -> Or9<B, T2, T3, T4, T5, T6, T7, T8, T9>where
F: FnOnce(T1) -> B,
Transforms the T1 value of the enum using a provided function, maintaining other types as is.
Sourcepub fn map_t2<F, B>(self, f: F) -> Or9<T1, B, T3, T4, T5, T6, T7, T8, T9>where
F: FnOnce(T2) -> B,
pub fn map_t2<F, B>(self, f: F) -> Or9<T1, B, T3, T4, T5, T6, T7, T8, T9>where
F: FnOnce(T2) -> B,
Transforms the T2 value of the enum using a provided function, maintaining other types as is.
Sourcepub fn map_t3<F, B>(self, f: F) -> Or9<T1, T2, B, T4, T5, T6, T7, T8, T9>where
F: FnOnce(T3) -> B,
pub fn map_t3<F, B>(self, f: F) -> Or9<T1, T2, B, T4, T5, T6, T7, T8, T9>where
F: FnOnce(T3) -> B,
Transforms the T3 value of the enum using a provided function, maintaining other types as is.
Sourcepub fn map_t4<F, B>(self, f: F) -> Or9<T1, T2, T3, B, T5, T6, T7, T8, T9>where
F: FnOnce(T4) -> B,
pub fn map_t4<F, B>(self, f: F) -> Or9<T1, T2, T3, B, T5, T6, T7, T8, T9>where
F: FnOnce(T4) -> B,
Transforms the T4 value of the enum using a provided function, maintaining other types as is.
Sourcepub fn map_t5<F, B>(self, f: F) -> Or9<T1, T2, T3, T4, B, T6, T7, T8, T9>where
F: FnOnce(T5) -> B,
pub fn map_t5<F, B>(self, f: F) -> Or9<T1, T2, T3, T4, B, T6, T7, T8, T9>where
F: FnOnce(T5) -> B,
Transforms the T5 value of the enum using a provided function, maintaining other types as is.
Sourcepub fn map_t6<F, B>(self, f: F) -> Or9<T1, T2, T3, T4, T5, B, T7, T8, T9>where
F: FnOnce(T6) -> B,
pub fn map_t6<F, B>(self, f: F) -> Or9<T1, T2, T3, T4, T5, B, T7, T8, T9>where
F: FnOnce(T6) -> B,
Transforms the T6 value of the enum using a provided function, maintaining other types as is.
Sourcepub fn map_t7<F, B>(self, f: F) -> Or9<T1, T2, T3, T4, T5, T6, B, T8, T9>where
F: FnOnce(T7) -> B,
pub fn map_t7<F, B>(self, f: F) -> Or9<T1, T2, T3, T4, T5, T6, B, T8, T9>where
F: FnOnce(T7) -> B,
Transforms the T7 value of the enum using a provided function, maintaining other types as is.
Sourcepub fn map_t8<F, B>(self, f: F) -> Or9<T1, T2, T3, T4, T5, T6, T7, B, T9>where
F: FnOnce(T8) -> B,
pub fn map_t8<F, B>(self, f: F) -> Or9<T1, T2, T3, T4, T5, T6, T7, B, T9>where
F: FnOnce(T8) -> B,
Transforms the T8 value of the enum using a provided function, maintaining other types as is.
Sourcepub fn map_t9<F, B>(self, f: F) -> Or9<T1, T2, T3, T4, T5, T6, T7, T8, B>where
F: FnOnce(T9) -> B,
pub fn map_t9<F, B>(self, f: F) -> Or9<T1, T2, T3, T4, T5, T6, T7, T8, B>where
F: FnOnce(T9) -> B,
Transforms the T9 value of the enum using a provided function, maintaining other types as is.
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> Or9<T1, T2, T3, T4, T5, T6, T7, T8, T9>where
T1: 'static,
T2: 'static,
T3: 'static,
T4: 'static,
T5: 'static,
T6: 'static,
T7: 'static,
T8: 'static,
T9: 'static,
Extension to Or9
to check if the enum’s type matches a arbitrary type.
Currently, these functions depend on the rustc intrinsics, and the constraints
of the intrinsics require that the type must satisfy 'static'
.
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> Or9<T1, T2, T3, T4, T5, T6, T7, T8, T9>where
T1: 'static,
T2: 'static,
T3: 'static,
T4: 'static,
T5: 'static,
T6: 'static,
T7: 'static,
T8: 'static,
T9: 'static,
Extension to Or9
to check if the enum’s type matches a arbitrary type.
Currently, these functions depend on the rustc intrinsics, and the constraints
of the intrinsics require that the type must satisfy 'static'
.