Struct ps2::MousePacket4
source · pub struct MousePacket4 { /* private fields */ }
Implementations§
source§impl MousePacket4
impl MousePacket4
source§impl MousePacket4
impl MousePacket4
sourcepub const fn into_bytes(self) -> [u8; 4]
pub const fn into_bytes(self) -> [u8; 4]
sourcepub const fn from_bytes(bytes: [u8; 4]) -> Self
pub const fn from_bytes(bytes: [u8; 4]) -> Self
Converts the given bytes directly into the bitfield struct.
source§impl MousePacket4
impl MousePacket4
Returns the value of button_4.
Returns the value of button_4.
#Errors
If the returned value contains an invalid bit pattern for button_4.
Returns a copy of the bitfield with the value of button_4 set to the given value.
#Panics
If the given value is out of bounds for button_4.
Returns a copy of the bitfield with the value of button_4 set to the given value.
#Errors
If the given value is out of bounds for button_4.
Sets the value of button_4 to the given value.
#Panics
If the given value is out of bounds for button_4.
Sets the value of button_4 to the given value.
#Errors
If the given value is out of bounds for button_4.
Returns the value of button_5.
Returns the value of button_5.
#Errors
If the returned value contains an invalid bit pattern for button_5.
Returns a copy of the bitfield with the value of button_5 set to the given value.
#Panics
If the given value is out of bounds for button_5.
Returns a copy of the bitfield with the value of button_5 set to the given value.
#Errors
If the given value is out of bounds for button_5.
Sets the value of button_5 to the given value.
#Panics
If the given value is out of bounds for button_5.
Sets the value of button_5 to the given value.
#Errors
If the given value is out of bounds for button_5.
source§impl MousePacket4
impl MousePacket4
sourcepub fn scroll_movement(&self) -> i8
pub fn scroll_movement(&self) -> i8
often called z_movement
, renamed to disambiguate