pub struct ChannelMode {
pub channel: u8,
pub message: ChannelModeMessage,
}Expand description
A channel-mode message on a specific channel.
Fields§
§channel: u8MIDI channel, 0..=15.
message: ChannelModeMessageThe channel-mode operation.
Implementations§
Source§impl ChannelMode
impl ChannelMode
Sourcepub fn new(channel: u8, message: ChannelModeMessage) -> Result<Self, AudioError>
pub fn new(channel: u8, message: ChannelModeMessage) -> Result<Self, AudioError>
Construct a validated channel-mode message.
Sourcepub fn parse(bytes: &[u8]) -> Result<Self, AudioError>
pub fn parse(bytes: &[u8]) -> Result<Self, AudioError>
Parse from a slice whose first byte is a Control Change status with a channel-mode controller (120..=127).
Trait Implementations§
Source§impl Clone for ChannelMode
impl Clone for ChannelMode
impl Copy for ChannelMode
Source§impl Debug for ChannelMode
impl Debug for ChannelMode
impl Eq for ChannelMode
Source§impl PartialEq for ChannelMode
impl PartialEq for ChannelMode
impl StructuralPartialEq for ChannelMode
Auto Trait Implementations§
impl Freeze for ChannelMode
impl RefUnwindSafe for ChannelMode
impl Send for ChannelMode
impl Sync for ChannelMode
impl Unpin for ChannelMode
impl UnsafeUnpin for ChannelMode
impl UnwindSafe for ChannelMode
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