Byte-Unit
Byte-Unit copied to clipboard
[Feature request] Arithmetic Operations
Hey,
I've been finding myself using this crate for a personal project, however a current struggle is to add Bytes together (I currently use get_bytes to addition them), however, it'd be great if we'd be able to simply add those two together:
let byte1 = Byte::from(10)
let byte2 = Byte::from(20)
let byte3 = byte1 + byte2 // Currently doesn't work
Every operation should be checked to prevent panic or incorrect result. You can use the add method.
let byte3 = byte1.add(byte2).unwrap();