pub trait IntoViews: StaticViews { }Expand description
Converts a statically shaped expression into positional views.
This trait is sealed. () represents no views, fixed-size arrays represent homogeneous
shapes, and tuples represent heterogeneous shapes. Dynamic collections require
ChildrenControl::keyed_children or View::keyed_fragment.
A Vec cannot supply positional children:
ⓘ
use windows_reactor::*;
let dynamic: Vec<View> = vec![TextBlock::new().into()];
let _ = StackPanel::new().children(dynamic);Iterator adapters cannot supply positional children:
ⓘ
use windows_reactor::*;
let dynamic = (0..3).map(|index| TextBlock::new().text(index.to_string()));
let _ = StackPanel::new().children(dynamic);Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".