Skip to main content

AdaptiveBuilder

Trait AdaptiveBuilder 

Source
pub trait AdaptiveBuilder: Sized {
    // Required methods
    fn spacing(self, s: impl Into<f64>) -> Self;
    fn stack_at(self, at: WidthClass) -> Self;
    fn align(self, a: VAlign) -> Self;
}
Expand description

Builder methods of Adaptive, 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 spacing(self, s: impl Into<f64>) -> Self

The gap between children, in either arrangement: a Space step or points.

Source

fn stack_at(self, at: WidthClass) -> Self

The widest WidthClass at which the children stack.

Source

fn align(self, a: VAlign) -> Self

The cross-axis alignment while the children sit in a row (default centered, as a row); stacked, they always align leading.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<C: PieceSeq> AdaptiveBuilder for Adaptive<C>

Source§

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

Day API ↩ Guides· daybrite.dev