pub struct Address {
pub high: u8,
pub mid: u8,
pub low: u8,
}Expand description
SysEx address (3 bytes)
Fields§
§high: u8High byte
mid: u8Mid byte
low: u8Low byte
Implementations§
Source§impl Address
impl Address
Sourcepub fn from_hex(hex: &str) -> Result<Address, RolandError>
pub fn from_hex(hex: &str) -> Result<Address, RolandError>
Create an address from a hex string (6 hex digits)
§Example
use roland_core::Address;
let addr = Address::from_hex("123456").unwrap();
assert_eq!(addr.high, 0x12);
assert_eq!(addr.mid, 0x34);
assert_eq!(addr.low, 0x56);Trait Implementations§
impl Copy for Address
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more