pub struct DeviceNumber(/* private fields */);Expand description
Re-exported so callers do not need a direct dependency on the codec crate for the handful of its types that appear in this one’s signatures. A device number a peer can hold.
Non-zero by construction: 0 on the wire means “no device”, and a peer
table that accepted it would grow an entry no request can ever be addressed
to.
Implementations§
Source§impl DeviceNumber
impl DeviceNumber
Sourcepub const MIN_PLAYER: u8 = 1
pub const MIN_PLAYER: u8 = 1
The lowest number a real player can be set to.
Sourcepub const MAX_PLAYER: u8 = 6
pub const MAX_PLAYER: u8 = 6
The highest number a real player can be set to.
Sourcepub const MAX_BROWSABLE: u8 = 4
pub const MAX_BROWSABLE: u8 = 4
The highest number a peer will offer as a browsable source (F45).
Sourcepub const ONE: DeviceNumber
pub const ONE: DeviceNumber
Device number 1, the lowest a player can hold.
Exists so that a caller needing a total fallback has one that is not a panic.
Sourcepub const fn new(raw: u8) -> Option<DeviceNumber>
pub const fn new(raw: u8) -> Option<DeviceNumber>
Parse a device number, rejecting zero.
Sourcepub const fn is_player(self) -> bool
pub const fn is_player(self) -> bool
Whether this is a number a real CDJ or mixer can be set to (1–6).
Numbers above this range are what observer tools take, and they are safe: they can never collide with hardware.
Sourcepub const fn browsable(self) -> Option<BrowsableDeviceNumber>
pub const fn browsable(self) -> Option<BrowsableDeviceNumber>
This number as a BrowsableDeviceNumber, or None if it is too high.
Trait Implementations§
Source§impl Clone for DeviceNumber
impl Clone for DeviceNumber
Source§fn clone(&self) -> DeviceNumber
fn clone(&self) -> DeviceNumber
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more