as_tuple

View any struct as a tuple! ✨

crates.io badge docs.rs badge Travis badge

toml [dependencies] as_tuple = "0.1"

```rust use as_tuple::AsTuple;

[derive(AsTuple, Debug)]

struct Position { x: f32, y: f32, }

let mut position = Position { x: 6.2, y: 4.3 }; let (x, y) = position.astuplemut(); *x -= 1.0; *y += 1.0; println!("{:#?}", position); ```

(You can try it with cargo run --example position)