Skip to main content

InspectorBuilder

Trait InspectorBuilder 

Source
pub trait InspectorBuilder: Sized {
    // Required methods
    fn width(self, width: f64) -> Self;
    fn not_scrollable(self) -> Self;
    fn sheet_done<M>(self, t: impl IntoText<M>) -> Self;
    fn edge(self, edge: PaneEdge) -> Self;
    fn half_sheet(self) -> Self;
}
Expand description

Builder methods of Inspector, 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 width(self, width: f64) -> Self

The panel’s preferred width in points (default INSPECTOR_WIDTH). Where the native pane has a user-draggable divider this is the initial width, not a limit.

Source

fn not_scrollable(self) -> Self

Do not wrap the panel in a scroll view (it is wrapped by default): for a panel that owns a recycling list or its own scroller, so it receives a bounded viewport.

Source

fn sheet_done<M>(self, t: impl IntoText<M>) -> Self

The label of the compact sheet’s dismiss button (default ✕). Pass a localized “Done”; the sheet is the one home where the panel needs its own way out.

Source

fn edge(self, edge: PaneEdge) -> Self

Put the pane on the leading side of the content, for a layer panel rather than a properties inspector (docs/tree.md). Default PaneEdge::Trailing.

Source

fn half_sheet(self) -> Self

On a compact window, present the panel as a half-height sheet rising from the bottom edge rather than a fullscreen one, so the content it describes stays on show (and, on iOS, interactive) while it is open: Cover::half_sheet. Default: the fullscreen sheet.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

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

Source§

impl<V: Binding<bool>> InspectorBuilder for Inspector<V>

Day API ↩ Guides· daybrite.dev