Skip to main content

NativeView

Trait NativeView 

Source
pub trait NativeView {
    // Provided method
    fn stretch_axis(&self) -> StretchAxis { ... }
}
Expand description

A trait for all views handled by the native backend.

This includes:

  • Configurable views (TextField, Slider, Toggle, etc.)
  • Raw views (Color, Spacer, Divider, Container, etc.)

The native backend uses this trait to query layout behavior.

Provided Methods§

Source

fn stretch_axis(&self) -> StretchAxis

Which axis (or axes) this view stretches to fill available space.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl NativeView for ()

Implementors§