async fn update_cursor_position(&mut self, mouse_event: &mouse::MouseEvent) {
        self.current_position = match mouse_event.location {
            mouse::MouseLocation::Relative(offset) if offset != Position::zero() => {
                self.current_position + offset
            }
            mouse::MouseLocation::Absolute(position) if position != self.current_position => {
                position
            }
            _ => return,
        };

        Position::clamp_size(&mut self.current_position, Size::zero(), self.screen_size)
    }
/// Updates the current cursor position according to the received mouse event.
///
/// # Parameters
/// - `mouse_event`: The mouse event to use to update the cursor position.
Updates the current cursor position according to the received mouse event.
Updates the current cursor position according to the received mouse event .
async fn update_cursor_position(&mut self, mouse_event: &mouse::MouseEvent) {
        self.current_position = match mouse_event.location {
            mouse::MouseLocation::Relative(offset) if offset != Position::zero() => {
                self.current_position + offset
            }
            mouse::MouseLocation::Absolute(position) if position != self.current_position => {
                position
            }
            _ => return,
        };
        Position::clamp_size(&mut self.current_position, Size::zero(), self.screen_size)
    }
async fn update_cursor_position ( & mut self , mouse_event : & mouse :: MouseEvent ) { self . current_position = match mouse_event . location { mouse :: MouseLocation :: Relative ( offset ) if offset != Position :: zero ( ) => { self . current_position + offset } mouse :: MouseLocation :: Absolute ( position ) if position != self . current_position => { position } _ => return , } ; Position :: clamp_size ( & mut self . current_position , Size :: zero ( ) , self . screen_size ) }
Updates the current cursor position according to the received mouse event.
Updates the current cursor position according to the received mouse event .
&mut self
mouse_event
&mouse::MouseEvent
&mut self
mouse_event
&mouse::MouseEvent
The mouse event to use to update the cursor position.
The mouse event to use to update the cursor position .