pub struct PickerView<'a, T> {
pub query: &'a str,
pub cursor: usize,
pub rows: Vec<&'a PickerItem<T>>,
pub selected: usize,
}Expand description
The render-facing snapshot: everything a GPU or terminal renderer
needs to draw the overlay, and nothing it doesn’t. Borrows from the
picker — no allocation, no clone of T.
Fields§
§query: &'a strThe current query text (draw it in the filter input box).
cursor: usizeThe cursor byte-offset within query (for a caret).
rows: Vec<&'a PickerItem<T>>The filtered + ranked rows, in display order.
selected: usizeThe highlighted index within rows (0 when rows is empty).
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for PickerView<'a, T>
impl<'a, T> RefUnwindSafe for PickerView<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for PickerView<'a, T>where
T: Sync,
impl<'a, T> Sync for PickerView<'a, T>where
T: Sync,
impl<'a, T> Unpin for PickerView<'a, T>
impl<'a, T> UnsafeUnpin for PickerView<'a, T>
impl<'a, T> UnwindSafe for PickerView<'a, T>where
T: RefUnwindSafe,
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