pub trait ScrollBuilder: Sized {
// Required methods
fn horizontal(self) -> Self;
fn axis(self, axis: Axis) -> Self;
fn scroll_target(self, target: impl Binding<Option<ScrollTarget>>) -> Self;
}Expand description
Required Methods§
Sourcefn horizontal(self) -> Self
fn horizontal(self) -> Self
Scroll horizontally instead of vertically (a filmstrip of cards, a chip row). The content is measured unconstrained on the horizontal axis and the native view scrolls sideways.
Sourcefn scroll_target(self, target: impl Binding<Option<ScrollTarget>>) -> Self
fn scroll_target(self, target: impl Binding<Option<ScrollTarget>>) -> Self
Programmatic scrolling (docs/scroll.md): each Some(target) written to sig scrolls
there (animated), then the signal resets to None. Write-and-forget, so the same
target can be sent twice in a row.
ⓘ
let jump = Signal::new(None);
scroll(rows).scroll_target(jump);
button("Bottom").action(move || jump.set(Some(ScrollTarget::Bottom)));Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".