pub struct Midi2<'a> { /* private fields */ }Implementations§
Source§impl<'a> Midi2<'a>
impl<'a> Midi2<'a>
Sourcepub const unsafe fn new_unchecked(header: &'a Header) -> Self
pub const unsafe fn new_unchecked(header: &'a Header) -> Self
§Safety
The header must be a header of type: clap_event_midi2.
pub const fn port_index(&self) -> u16
pub const fn data(&self) -> &[u32; 4]
Sourcepub const fn build() -> Midi2Builder
pub const fn build() -> Midi2Builder
§Example
let midi = Midi2::build().port_index(1).time(3);
let event = midi.event();
assert_eq!(event.port_index(), 1);
assert_eq!(event.header().time(), 3);Sourcepub fn update(&self) -> Midi2Builder
pub fn update(&self) -> Midi2Builder
§Example
let midi = Midi2::build().port_index(1).data([1, 2, 3, 4]);
let event = midi.event();
let other_midi = event.update().data([4, 5, 6, 7]);
let other_event = other_midi.event();
assert_eq!(event.port_index(), 1);
assert_eq!(event.data(), &[1, 2, 3, 4]);
assert_eq!(other_event.port_index(), 1);
assert_eq!(other_event.data(), &[4, 5, 6, 7]);Trait Implementations§
impl<'a> Copy for Midi2<'a>
impl<'a> StructuralPartialEq for Midi2<'a>
Auto Trait Implementations§
impl<'a> Freeze for Midi2<'a>
impl<'a> RefUnwindSafe for Midi2<'a>
impl<'a> Send for Midi2<'a>
impl<'a> Sync for Midi2<'a>
impl<'a> Unpin for Midi2<'a>
impl<'a> UnwindSafe for Midi2<'a>
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