[−][src]Module batch_oper::combin
No nesting combine
Tuple example
let a: (i32, u8) = 1.with(2u8); assert_eq!(a, (1, 2)); let b: (i32, u8, f64) = a.with(3f64); assert_eq!(b, (1, 2, 3.0)); let c: (usize, i32, u8, f64) = b.after(0usize); assert_eq!(c, (0, 1, 2, 3.0)); // feature = "combin-mutual" let m: (u8, u8, u8, u8) = (1, 2).with((3, 4)); assert_eq!(m, (1, 2, 3, 4));
Array example
let a: [u8; 2] = 1.with(2); assert_eq!(a, [1, 2]); let b: [u8; 3] = a.with(3); assert_eq!(b, [1, 2, 3]); let c: [u8; 4] = b.after(0); assert_eq!(c, [0, 1, 2, 3]); // feature = "combin-mutual" let m: [u8; 4] = [1, 2].with([3, 4]); assert_eq!(m, [1, 2, 3, 4]);
Traits
| After | No nesting combine |
| Before | No nesting combine |
| With | No nesting combine |