pub enum DevicePriority {
Low,
Normal,
High,
Critical,
}Expand description
Device priority levels for connection management.
The manager never disconnects a device on its own to make room for
another: when the connection limit is reached, connect() fails, and
DeviceManager::evict_lowest_priority frees a slot when you call it,
unless a connect() of the device it picks keeps that device connected.
The health monitor (DeviceManager::start_health_monitor) reconnects
lost devices highest priority first.
Variants§
Low
Low priority: evicted first by evict_lowest_priority.
Normal
Normal priority (default).
High
High priority: evicted only when no Low or Normal device is connected.
Critical
Critical priority: never evicted.
Trait Implementations§
Source§impl Clone for DevicePriority
impl Clone for DevicePriority
Source§fn clone(&self) -> DevicePriority
fn clone(&self) -> DevicePriority
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DevicePriority
impl Debug for DevicePriority
Source§impl Default for DevicePriority
impl Default for DevicePriority
Source§fn default() -> DevicePriority
fn default() -> DevicePriority
Returns the “default value” for a type. Read more
Source§impl Ord for DevicePriority
impl Ord for DevicePriority
Source§fn cmp(&self, other: &DevicePriority) -> Ordering
fn cmp(&self, other: &DevicePriority) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DevicePriority
impl PartialEq for DevicePriority
Source§impl PartialOrd for DevicePriority
impl PartialOrd for DevicePriority
impl Copy for DevicePriority
impl Eq for DevicePriority
impl StructuralPartialEq for DevicePriority
Auto Trait Implementations§
impl Freeze for DevicePriority
impl RefUnwindSafe for DevicePriority
impl Send for DevicePriority
impl Sync for DevicePriority
impl Unpin for DevicePriority
impl UnwindSafe for DevicePriority
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