#[non_exhaustive]pub enum CursorStyle {
BlinkingBlock,
SteadyBlock,
BlinkingUnderline,
SteadyUnderline,
BlinkingBar,
SteadyBar,
}Expand description
The text cursor’s visual shape and blink behavior.
Mirrors the six shapes a DEC-compatible terminal’s DECSCUSR escape (CSI Ps SP q)
supports: block, underline, and bar, each either blinking or steady. #[non_exhaustive]
leaves room for a future shape (e.g. a hollow/outline block) without a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BlinkingBlock
A blinking solid block (█). The default terminal cursor shape on most emulators.
SteadyBlock
A steady (non-blinking) solid block.
BlinkingUnderline
A blinking underscore (_).
SteadyUnderline
A steady (non-blinking) underscore.
BlinkingBar
A blinking vertical bar (|), as commonly used for text-insertion cursors.
SteadyBar
A steady (non-blinking) vertical bar.
Trait Implementations§
Source§impl Clone for CursorStyle
impl Clone for CursorStyle
Source§fn clone(&self) -> CursorStyle
fn clone(&self) -> CursorStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CursorStyle
impl Debug for CursorStyle
Source§impl Default for CursorStyle
impl Default for CursorStyle
Source§fn default() -> CursorStyle
fn default() -> CursorStyle
Returns the “default value” for a type. Read more
Source§impl Hash for CursorStyle
impl Hash for CursorStyle
Source§impl PartialEq for CursorStyle
impl PartialEq for CursorStyle
Source§fn eq(&self, other: &CursorStyle) -> bool
fn eq(&self, other: &CursorStyle) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CursorStyle
impl Eq for CursorStyle
impl StructuralPartialEq for CursorStyle
Auto Trait Implementations§
impl Freeze for CursorStyle
impl RefUnwindSafe for CursorStyle
impl Send for CursorStyle
impl Sync for CursorStyle
impl Unpin for CursorStyle
impl UnsafeUnpin for CursorStyle
impl UnwindSafe for CursorStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<C> WithAlpha for Cwhere
C: Copy,
impl<C> WithAlpha for Cwhere
C: Copy,
§fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
Wraps
self with alpha, storing alpha before the color in memory
(see [AlphaFirst]).§fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
Wraps
self with alpha, storing alpha after the color in memory
(see [AlphaLast]).