Skip to main content

SplitBuilder

Trait SplitBuilder 

Source
pub trait SplitBuilder: Sized {
    // Required methods
    fn axis<M>(self, axis: impl IntoReactive<SplitAxis, M>) -> Self;
    fn fraction(self, fraction: impl Binding<f64>) -> Self;
    fn min_pane(self, points: f64) -> Self;
}
Expand description

Builder methods of Split, reachable through a Decorated (docs/api-style.md “Typed builders and erasure”): generic modifiers and typed ones chain in any order.

Required Methods§

Source

fn axis<M>(self, axis: impl IntoReactive<SplitAxis, M>) -> Self

Side by side (SplitAxis::Horizontal, the default) or stacked; a signal or a closure turns the split live, keeping the share.

Source

fn fraction(self, fraction: impl Binding<f64>) -> Self

The first pane’s share of the length, 0.0..=1.0, two-way: a dragged divider writes it, writing it moves the divider. Unbound, the split keeps a share of its own from 0.5.

Source

fn min_pane(self, points: f64) -> Self

The least length either pane may be dragged to (default SPLIT_MIN_PANE).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl SplitBuilder for Split

Source§

impl<DecoratedInner: SplitBuilder + Piece> SplitBuilder for Decorated<DecoratedInner>

Day API ↩ Guides· daybrite.dev