pub struct Bank {
pub index: u32,
pub name: String,
pub slots: u32,
}Expand description
One bank within a partition, from cmd::BANKS.
Fields§
§index: u32Zero-based position, as addresses use it. The panel shows this plus one.
name: StringThe device’s name for it. For pianos these are the panel’s categories
(Grand, Upright, EPiano1, …), not numbers.
slots: u32How many slots the bank holds. 0xfffe appears for the (Native) partitions and
is a sentinel, not a capacity.
Implementations§
Source§impl Bank
impl Bank
Sourcepub const UNBOUNDED: u32 = 0xfffe
pub const UNBOUNDED: u32 = 0xfffe
The sentinel the (Native) partitions report instead of a real capacity.
Sourcepub fn decode_all(msg: &Message) -> Result<Vec<Self>>
pub fn decode_all(msg: &Message) -> Result<Vec<Self>>
Decode a cmd::BANKS reply: the echoed partition, a count, then
[u32 name_len][name][u32 slots] records.
Sourcepub fn is_bounded(&self) -> bool
pub fn is_bounded(&self) -> bool
Whether Self::slots is a real capacity rather than the sentinel.
Trait Implementations§
impl Eq for Bank
impl StructuralPartialEq for Bank
Auto Trait Implementations§
impl Freeze for Bank
impl RefUnwindSafe for Bank
impl Send for Bank
impl Sync for Bank
impl Unpin for Bank
impl UnsafeUnpin for Bank
impl UnwindSafe for Bank
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