pub struct PowerLevels<T> {
pub levels: Vec<T>,
pub active: Option<usize>,
}
Expand description
List of power levels.
Fields§
§levels: Vec<T>
List of possible levels.
active: Option<usize>
The currently active level.
Implementations§
Source§impl<T> PowerLevels<T>
impl<T> PowerLevels<T>
Sourcepub fn active_level(&self) -> Option<&T>
pub fn active_level(&self) -> Option<&T>
Gets the currently active level value.
Trait Implementations§
Source§impl<T: Clone> Clone for PowerLevels<T>
impl<T: Clone> Clone for PowerLevels<T>
Source§fn clone(&self) -> PowerLevels<T>
fn clone(&self) -> PowerLevels<T>
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<T: Debug> Debug for PowerLevels<T>
impl<T: Debug> Debug for PowerLevels<T>
Source§impl<T: Default> Default for PowerLevels<T>
impl<T: Default> Default for PowerLevels<T>
Source§fn default() -> PowerLevels<T>
fn default() -> PowerLevels<T>
Returns the “default value” for a type. Read more
Source§impl<T: PartialEq> PartialEq for PowerLevels<T>
impl<T: PartialEq> PartialEq for PowerLevels<T>
impl<T: Eq> Eq for PowerLevels<T>
impl<T> StructuralPartialEq for PowerLevels<T>
Auto Trait Implementations§
impl<T> Freeze for PowerLevels<T>
impl<T> RefUnwindSafe for PowerLevels<T>where
T: RefUnwindSafe,
impl<T> Send for PowerLevels<T>where
T: Send,
impl<T> Sync for PowerLevels<T>where
T: Sync,
impl<T> Unpin for PowerLevels<T>where
T: Unpin,
impl<T> UnwindSafe for PowerLevels<T>where
T: UnwindSafe,
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