pub struct CaretRect {
pub position: Position,
pub rect: CodeRect,
}Expand description
Where an editor draws its caret, as the Renderer reported it.
Sent when the caret moves or the view scrolls, at most once a frame, and only to an editor whose application listens for it. The rectangle is the caret itself: as tall as a row and as wide as the caret is drawn.
Fields§
§position: PositionThe place in the document the caret stands at.
rect: CodeRectImplementations§
Source§impl CaretRect
impl CaretRect
Sourcepub fn from_payload(payload: &EventPayload<'_>) -> Option<Self>
pub fn from_payload(payload: &EventPayload<'_>) -> Option<Self>
The caret’s place and rectangle out of a CaretRect event, or None for any other.
Trait Implementations§
impl Copy for CaretRect
impl StructuralPartialEq for CaretRect
Auto Trait Implementations§
impl Forget for CaretRect
impl Freeze for CaretRect
impl Move for CaretRect
impl RefUnwindSafe for CaretRect
impl Send for CaretRect
impl Sync for CaretRect
impl Unpin for CaretRect
impl UnsafeUnpin for CaretRect
impl UnwindSafe for CaretRect
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