Struct emerald_runtime::mouse::MouseEvent
source · pub struct MouseEvent {
pub x: i16,
pub y: i16,
pub scroll_type: ScrollType,
pub buttons: u8,
}
Fields§
§x: i16
§y: i16
§scroll_type: ScrollType
Implementations§
source§impl MouseEvent
impl MouseEvent
pub const BYTES_SIZE: usize = 5usize
sourcepub unsafe fn from_bytes(bytes: [u8; 5]) -> MouseEvent
pub unsafe fn from_bytes(bytes: [u8; 5]) -> MouseEvent
Safety
The bytes
must be a valid representation of a MouseEvent
that has been created by as_bytes
pub fn as_bytes(&self) -> [u8; 5]
Trait Implementations§
source§impl Clone for MouseEvent
impl Clone for MouseEvent
source§fn clone(&self) -> MouseEvent
fn clone(&self) -> MouseEvent
Returns a copy 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 MouseEvent
impl Debug for MouseEvent
impl Copy for MouseEvent
Auto Trait Implementations§
impl RefUnwindSafe for MouseEvent
impl Send for MouseEvent
impl Sync for MouseEvent
impl Unpin for MouseEvent
impl UnwindSafe for MouseEvent
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