raw_view

Macro raw_view 

Source
macro_rules! raw_view {
    ($ty:ty, $axis:expr) => { ... };
    ($ty:ty) => { ... };
}
Expand description

Implements a native view that is handled by the platform backend.

This macro implements both NativeView and View traits for a type. The View::body() returns Native(self) to delegate to the native backend.

§Usage

// Default stretch axis (None)
raw_view!(Text);

// With explicit stretch axis
raw_view!(Color, StretchAxis::Both);
raw_view!(Spacer, StretchAxis::MainAxis);