pub struct LEDState { /* private fields */ }
Implementations§
source§impl LEDState
impl LEDState
sourcepub const fn into_bytes(self) -> [u8; 1]
pub const fn into_bytes(self) -> [u8; 1]
sourcepub const fn from_bytes(bytes: [u8; 1]) -> Self
pub const fn from_bytes(bytes: [u8; 1]) -> Self
Converts the given bytes directly into the bitfield struct.
source§impl LEDState
impl LEDState
sourcepub fn scroll_lock(&self) -> <bool as Specifier>::InOut
pub fn scroll_lock(&self) -> <bool as Specifier>::InOut
Returns the value of scroll_lock.
sourcepub fn scroll_lock_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn scroll_lock_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of scroll_lock.
#Errors
If the returned value contains an invalid bit pattern for scroll_lock.
sourcepub fn with_scroll_lock(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_scroll_lock(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of scroll_lock set to the given value.
#Panics
If the given value is out of bounds for scroll_lock.
sourcepub fn with_scroll_lock_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_scroll_lock_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of scroll_lock set to the given value.
#Errors
If the given value is out of bounds for scroll_lock.
sourcepub fn set_scroll_lock(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_scroll_lock(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of scroll_lock to the given value.
#Panics
If the given value is out of bounds for scroll_lock.
sourcepub fn set_scroll_lock_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_scroll_lock_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of scroll_lock to the given value.
#Errors
If the given value is out of bounds for scroll_lock.
sourcepub fn number_lock(&self) -> <bool as Specifier>::InOut
pub fn number_lock(&self) -> <bool as Specifier>::InOut
Returns the value of number_lock.
sourcepub fn number_lock_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn number_lock_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of number_lock.
#Errors
If the returned value contains an invalid bit pattern for number_lock.
sourcepub fn with_number_lock(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_number_lock(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of number_lock set to the given value.
#Panics
If the given value is out of bounds for number_lock.
sourcepub fn with_number_lock_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_number_lock_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of number_lock set to the given value.
#Errors
If the given value is out of bounds for number_lock.
sourcepub fn set_number_lock(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_number_lock(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of number_lock to the given value.
#Panics
If the given value is out of bounds for number_lock.
sourcepub fn set_number_lock_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_number_lock_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of number_lock to the given value.
#Errors
If the given value is out of bounds for number_lock.
sourcepub fn caps_lock_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn caps_lock_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of caps_lock.
#Errors
If the returned value contains an invalid bit pattern for caps_lock.
sourcepub fn with_caps_lock(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_caps_lock(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of caps_lock set to the given value.
#Panics
If the given value is out of bounds for caps_lock.
sourcepub fn with_caps_lock_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_caps_lock_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of caps_lock set to the given value.
#Errors
If the given value is out of bounds for caps_lock.
sourcepub fn set_caps_lock(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_caps_lock(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of caps_lock to the given value.
#Panics
If the given value is out of bounds for caps_lock.
sourcepub fn set_caps_lock_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_caps_lock_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of caps_lock to the given value.
#Errors
If the given value is out of bounds for caps_lock.