pub enum Cursor {
}Expand description
The pointer’s shape over a piece (the .cursor() decorator, docs/cursor.md).
The named variants are the CSS cursor vocabulary: the largest set any toolkit accepts as it
is (GTK and the DOM take the names verbatim), and every other toolkit’s set is a subset of it
or maps onto it. A backend draws its own shape for each name, or the nearest one it has, and
answers Cap::Cursor with how faithful that is. Cursor::Native reaches a shape only one
toolkit names; the day::cursor::<toolkit> modules carry those as constants, gated on that
toolkit’s feature, and every other backend ignores a name it does not know.
A cursor applies to the node and its descendants until a descendant sets its own.
Cursor::Default hands the shape back to the platform rather than pinning an arrow, so a
reactive cursor can release what it took.
Variants§
Default
The platform default (an arrow), and the value that releases a node’s cursor.
Pointer
A pointing hand: links and other tap-to-activate content.
Text
An I-beam over editable or selectable text.
VerticalText
An I-beam for vertical text.
Crosshair
Move
Four-way move.
Grab
An open hand: content that can be dragged.
Grabbing
A closed hand: content being dragged.
NotAllowed
Wait
The app is busy and cannot take input.
Progress
The app is busy but still takes input.
Help
ContextMenu
Copy
A drop will copy.
Alias
A drop will link.
Cell
A table cell.
ZoomIn
ZoomOut
None
No pointer at all.
NsResize
Vertical (north–south) resize.
EwResize
Horizontal (east–west) resize.
NeswResize
Diagonal resize, north-east to south-west.
NwseResize
Diagonal resize, north-west to south-east.
ColResize
RowResize
Native(Cow<'static, str>)
A toolkit’s own named cursor, resolved by that backend’s lookup and ignored by every
other. Prefer the day::cursor::<toolkit> constants, which are gated on the toolkit.
Implementations§
Trait Implementations§
impl Eq for Cursor
impl StructuralPartialEq for Cursor
Auto Trait Implementations§
impl Freeze for Cursor
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnsafeUnpin for Cursor
impl UnwindSafe for Cursor
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more