usbd_midi/message/data/mod.rs
1//! Primitives and structures used in USB MIDI data.
2
3pub mod u14;
4pub mod u4;
5pub mod u7;
6
7/// Like from, but will conceptually overflow if the value is too big
8/// this is useful from going from higher ranges to lower ranges
9pub trait FromOverFlow<T>: Sized {
10 /// Convert with overflowing.
11 fn from_overflow(_: T) -> Self;
12}
13
14/// Like from, but will clamp the value to a maximum value
15pub trait FromClamped<T>: Sized {
16 /// Convert with clamping.
17 fn from_clamped(_: T) -> Self;
18}