#[non_exhaustive]pub enum Message<Row> {
BodyScrolled(AbsoluteOffset),
Fetched {
generation: u64,
start: usize,
rows: Vec<Row>,
},
RowPressed {
index: usize,
},
RowHovered {
index: usize,
},
RowUnhovered {
index: usize,
},
ColumnResizing {
index: usize,
delta: f32,
},
ColumnResized {
index: usize,
},
ColumnAutoSizeRequested {
index: usize,
},
ScrollbarDragged(f32),
ColumnMeasured {
index: usize,
width: f32,
},
HeaderPressed {
index: usize,
},
}Expand description
Messages the grid emits and consumes.
#[non_exhaustive]: new capabilities add variants, so match with a
wildcard arm. Most integrations never match at all — they forward
everything to VirtualGrid::update.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BodyScrolled(AbsoluteOffset)
The body scrollable moved; carries its absolute offset (x and y).
Fetched
A fetch resolved: rows start at index start.
Fields
RowPressed
A body row was clicked; index is its position in the current order.
On update, a click on a fetched row
single-selects it (Selection holds exactly that row) and
moves keyboard focus to it; a click on a not-yet-fetched placeholder
row does nothing. That is the whole v1 gesture policy — ctrl/shift
multi-select gestures are unshipped (the underlying Selection is
a set; drive multi-selection programmatically via
selection_mut). To react to clicks
yourself (master-detail panes), match this variant in your update
before forwarding, or read
selection/focus
after forwarding.
RowHovered
The cursor entered a body row (drives the hover highlight).
RowUnhovered
The cursor left a body row.
ColumnResizing
A column is being resized: delta px from the drag origin.
ColumnResized
A column resize ended; commit the width.
ColumnAutoSizeRequested
A resize grip was double-clicked: auto-size the column to its content.
ScrollbarDragged(f32)
The grid’s own vertical scrollbar (the min-thumb replacement for the scrollable’s hidden one) was dragged or rail-clicked to an absolute y offset.
ColumnMeasured
The phantom measurer reported a column’s natural content width (the widest of its header — including the sort indicator when sorted — visible cells, and footer, without cell padding).
HeaderPressed
A sortable column’s header was clicked; toggle sorting by it.
Trait Implementations§
Auto Trait Implementations§
impl<Row> Freeze for Message<Row>
impl<Row> RefUnwindSafe for Message<Row>where
Vec<Row>: RefUnwindSafe,
impl<Row> Send for Message<Row>
impl<Row> Sync for Message<Row>
impl<Row> Unpin for Message<Row>
impl<Row> UnsafeUnpin for Message<Row>where
Vec<Row>: UnsafeUnpin,
impl<Row> UnwindSafe for Message<Row>where
Vec<Row>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.