pub struct CursorSpec {
pub char: String,
pub offset_x: u32,
pub color: Option<String>,
pub blink: bool,
pub blink_ms: u32,
pub opacity: f32,
}Expand description
Cursor style specification used in rendering and theming.
Defines visual appearance and animation behavior of the text cursor. Can be customized via theme presets or CLI overrides.
Fieldsยง
ยงchar: StringCursor glyph (e.g. "โ", "|", "โก๏ธ").
This is the character rendered as the cursor.
offset_x: u32Horizontal offset of the cursor in pixels. Useful for aligning visual placement with fonts.
color: Option<String>Cursor color in hex format (e.g. "#00FF00"), or None.
If None, inherits the text color from [StyleSpec].
blink: boolWhether the cursor should blink.
If true, enables a periodic visibility toggle.
blink_ms: u32Blinking interval in milliseconds.
Only effective if [blink] is true.
opacity: f32Opacity level of the cursor (range: 0.0 to 1.0).
Allows defining soft or transparent cursors (e.g. 0.6).
Trait Implementationsยง
Sourceยงimpl Clone for CursorSpec
impl Clone for CursorSpec
Sourceยงfn clone(&self) -> CursorSpec
fn clone(&self) -> CursorSpec
Returns a duplicate 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 moreAuto Trait Implementationsยง
impl Freeze for CursorSpec
impl RefUnwindSafe for CursorSpec
impl Send for CursorSpec
impl Sync for CursorSpec
impl Unpin for CursorSpec
impl UnwindSafe for CursorSpec
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