pub struct PendingInlays {
pub map: Arc<Mutex<HashMap<BufferId, Vec<InlayRow>>>>,
pub waker: Arc<Mutex<Option<Arc<Notify>>>>,
}Expand description
Shared state between mode-side producers and the Editor’s tick drain. A buffer’s entry is a full replacement — a producer that recomputes a listing publishes the whole set, so a shorter listing leaves nothing of the old behind.
Fields§
§map: Arc<Mutex<HashMap<BufferId, Vec<InlayRow>>>>Undrained rows by buffer; the host’s tick drain moves each entry into the buffer’s inlay local.
waker: Arc<Mutex<Option<Arc<Notify>>>>The editor’s async_landed notify (set_waker
at boot). None means stores land but nothing wakes.
Implementations§
Source§impl PendingInlays
impl PendingInlays
Sourcepub fn store_and_wake(&self, buffer_id: BufferId, rows: Vec<InlayRow>)
pub fn store_and_wake(&self, buffer_id: BufferId, rows: Vec<InlayRow>)
Publish rows for buffer_id, replacing any previous set, and
wake the Editor so they reach the screen without waiting for a
keystroke.
Sourcepub fn clear_and_wake(&self, buffer_id: BufferId)
pub fn clear_and_wake(&self, buffer_id: BufferId)
Drop a buffer’s virtual text (buffer closed, or the producing mode deactivated). Wakes, so the removal is painted promptly.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PendingInlays
impl RefUnwindSafe for PendingInlays
impl Send for PendingInlays
impl Sync for PendingInlays
impl Unpin for PendingInlays
impl UnsafeUnpin for PendingInlays
impl UnwindSafe for PendingInlays
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