pub enum Cursor {
Available(Point),
Unavailable,
}
Expand description
The mouse cursor state.
Variants§
Available(Point)
The cursor has a defined position.
The cursor is currently unavailable (i.e. out of bounds or busy).
Implementations§
source§impl Cursor
impl Cursor
sourcepub fn position(self) -> Option<Point>
pub fn position(self) -> Option<Point>
Returns the absolute position of the Cursor
, if available.
sourcepub fn position_over(self, bounds: Rectangle) -> Option<Point>
pub fn position_over(self, bounds: Rectangle) -> Option<Point>
sourcepub fn position_in(self, bounds: Rectangle) -> Option<Point>
pub fn position_in(self, bounds: Rectangle) -> Option<Point>
Trait Implementations§
source§impl PartialEq for Cursor
impl PartialEq for Cursor
impl Copy for Cursor
impl StructuralPartialEq for Cursor
Auto Trait Implementations§
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnwindSafe for Cursor
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