Struct mouse_data::MouseButtons
source · pub struct MouseButtons { /* private fields */ }
Implementations§
source§impl MouseButtons
impl MouseButtons
source§impl MouseButtons
impl MouseButtons
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 MouseButtons
impl MouseButtons
sourcepub fn left_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn left_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of left.
#Errors
If the returned value contains an invalid bit pattern for left.
sourcepub fn with_left(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_left(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of left set to the given value.
#Panics
If the given value is out of bounds for left.
sourcepub fn with_left_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_left_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of left set to the given value.
#Errors
If the given value is out of bounds for left.
sourcepub fn set_left(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_left(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of left to the given value.
#Panics
If the given value is out of bounds for left.
sourcepub fn set_left_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_left_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of left to the given value.
#Errors
If the given value is out of bounds for left.
sourcepub fn right_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn right_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of right.
#Errors
If the returned value contains an invalid bit pattern for right.
sourcepub fn with_right(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_right(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of right set to the given value.
#Panics
If the given value is out of bounds for right.
sourcepub fn with_right_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_right_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of right set to the given value.
#Errors
If the given value is out of bounds for right.
sourcepub fn set_right(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_right(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of right to the given value.
#Panics
If the given value is out of bounds for right.
sourcepub fn set_right_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_right_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of right to the given value.
#Errors
If the given value is out of bounds for right.
sourcepub fn middle_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn middle_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of middle.
#Errors
If the returned value contains an invalid bit pattern for middle.
sourcepub fn with_middle(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_middle(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of middle set to the given value.
#Panics
If the given value is out of bounds for middle.
sourcepub fn with_middle_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_middle_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of middle set to the given value.
#Errors
If the given value is out of bounds for middle.
sourcepub fn set_middle(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_middle(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of middle to the given value.
#Panics
If the given value is out of bounds for middle.
sourcepub fn set_middle_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_middle_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of middle to the given value.
#Errors
If the given value is out of bounds for middle.
sourcepub fn fourth_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn fourth_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of fourth.
#Errors
If the returned value contains an invalid bit pattern for fourth.
sourcepub fn with_fourth(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_fourth(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of fourth set to the given value.
#Panics
If the given value is out of bounds for fourth.
sourcepub fn with_fourth_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_fourth_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of fourth set to the given value.
#Errors
If the given value is out of bounds for fourth.
sourcepub fn set_fourth(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_fourth(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of fourth to the given value.
#Panics
If the given value is out of bounds for fourth.
sourcepub fn set_fourth_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_fourth_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of fourth to the given value.
#Errors
If the given value is out of bounds for fourth.
sourcepub fn fifth_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn fifth_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of fifth.
#Errors
If the returned value contains an invalid bit pattern for fifth.
sourcepub fn with_fifth(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_fifth(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of fifth set to the given value.
#Panics
If the given value is out of bounds for fifth.
sourcepub fn with_fifth_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_fifth_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of fifth set to the given value.
#Errors
If the given value is out of bounds for fifth.
sourcepub fn set_fifth(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_fifth(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of fifth to the given value.
#Panics
If the given value is out of bounds for fifth.
sourcepub fn set_fifth_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_fifth_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of fifth to the given value.
#Errors
If the given value is out of bounds for fifth.
Trait Implementations§
source§impl Clone for MouseButtons
impl Clone for MouseButtons
source§fn clone(&self) -> MouseButtons
fn clone(&self) -> MouseButtons
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more