into-a-byte

Build ORed byte from members of tuple of Into that acts as a bit switch.

Example

Built byte is used to send to a I2C devise for example.

```rs use intoabit::*;

enum FunctionA { Enabled = 1 << 3, Disabled = 0, }

enum FunctionB { Enabled = 1 << 2, Disabled = 0, }

enum FunctionC { Enabled = 1 << 1, Disabled = 0, }

enum FunctionD { Enabled = 1, Disabled = 0, }

enumsintou8!(FunctionA, FunctionB, FunctionC, FunctionD);

fn sendtodevice(value: (FunctionA, FunctionB, FunctionC, FunctionD)) { // A byte for send to a register for example. let byte = value.intoabyte(); // TODO }

fn main() { sendtodevice(( FunctionA::Enabled, FunctionB::Disabled, FunctionC::Enabled, FunctionD::Enabled, )); } ```