pub trait Rotatable {
type RotLeftOutput: TupleLike;
type RotRightOutput: TupleLike;
// Required methods
fn rot_l(self) -> Self::RotLeftOutput;
fn rot_r(self) -> Self::RotRightOutput;
}Expand description
Required Associated Types§
sourcetype RotLeftOutput: TupleLike
type RotLeftOutput: TupleLike
The type of tuple generated by left rorating the elements of the tuple.
sourcetype RotRightOutput: TupleLike
type RotRightOutput: TupleLike
The type of tuple generated by right rotating the elements of the tuple.
Required Methods§
sourcefn rot_l(self) -> Self::RotLeftOutput
fn rot_l(self) -> Self::RotLeftOutput
Left rotates the elements of the tuple.
§Examples
use tuplez::*;
let tup = tuple!(1, "2", 3.0, 4);
let tup2 = tup.rot_l();
assert_eq!(tup2, tuple!("2", 3.0, 4, 1));sourcefn rot_r(self) -> Self::RotRightOutput
fn rot_r(self) -> Self::RotRightOutput
Right rotates the elements of the tuple.
§Examples
use tuplez::*;
let tup = tuple!(1, "2", 3.0, 4);
let tup2 = tup.rot_r();
assert_eq!(tup2, tuple!(4, 1, "2", 3.0));