#[repr(u8)]pub enum PowerLimit {
W072 = 0,
W144 = 1,
W216 = 2,
W288 = 3,
W180 = 4,
}
Expand description
Represents the power limit (Group 4) for CMD6
.
Variants§
W072 = 0
Default power limit: 0.72W.
W144 = 1
Power limit: 1.44W.
W216 = 2
Power limit: 2.16W.
W288 = 3
Power limit: 2.88W.
W180 = 4
Power limit: 1.80W.
Implementations§
Source§impl PowerLimit
impl PowerLimit
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new PowerLimit.
Sourcepub const fn from_raw_unchecked(val: u8) -> Self
pub const fn from_raw_unchecked(val: u8) -> Self
Sourcepub const fn from_raw(val: u8) -> Result<Self, Error>
pub const fn from_raw(val: u8) -> Result<Self, Error>
Attempts to convert a u8
into a PowerLimit.
Sourcepub const fn into_raw(self) -> u8
pub const fn into_raw(self) -> u8
Converts a PowerLimit into a u8
.
Trait Implementations§
Source§impl Clone for PowerLimit
impl Clone for PowerLimit
Source§fn clone(&self) -> PowerLimit
fn clone(&self) -> PowerLimit
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 PowerLimit
impl Debug for PowerLimit
Source§impl Default for PowerLimit
impl Default for PowerLimit
Source§impl From<PowerLimit> for u8
impl From<PowerLimit> for u8
Source§fn from(val: PowerLimit) -> Self
fn from(val: PowerLimit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PowerLimit
impl PartialEq for PowerLimit
Source§impl TryFrom<u8> for PowerLimit
impl TryFrom<u8> for PowerLimit
impl Copy for PowerLimit
impl Eq for PowerLimit
impl StructuralPartialEq for PowerLimit
Auto Trait Implementations§
impl Freeze for PowerLimit
impl RefUnwindSafe for PowerLimit
impl Send for PowerLimit
impl Sync for PowerLimit
impl Unpin for PowerLimit
impl UnwindSafe for PowerLimit
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