pub trait IntoView {
// Required method
fn into_view(self) -> View;
}Expand description
Anything that can become a View.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T: IntoView> IntoView for Option<T>
Optional is a view in SwiftUI: nil renders as nothing.
impl<T: IntoView> IntoView for Option<T>
Optional is a view in SwiftUI: nil renders as nothing.
So Some(v) is v and None is an EmptyView, which is what lets a
children.iter().map(...) that sometimes yields nothing be passed straight
into a container.