#[non_exhaustive]pub enum ViewKind {
Box,
Row,
Column,
ZStack,
OverlayHost,
Text {Show 16 fields
text: String,
color: Color,
font_size: Sp,
soft_wrap: bool,
max_lines: Option<usize>,
overflow: TextOverflow,
font_family: Option<&'static str>,
annotations: Option<Arc<[TextSpan]>>,
text_align: TextAlign,
font_weight: FontWeight,
font_style: FontStyle,
text_decoration: TextDecoration,
letter_spacing: Sp,
line_height: Sp,
url: Option<Arc<str>>,
font_variation_settings: Option<Arc<str>>,
},
Image {
handle: ImageHandle,
tint: Color,
fit: ImageFit,
},
SubcomposeLayout {
content: Arc<dyn Fn(&SubcomposeScope) -> Vec<(u64, View)>>,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Box
Row
Column
ZStack
OverlayHost
Text
Image
SubcomposeLayout
A layout whose children are produced by calling content with the
current SubcomposeScope. The closure is invoked during reconciliation
and returns a list of (slot_id, view) pairs. Each slot id is a stable
identity used to reconcile the returned view across frames. This is
the building block for BoxWithConstraints and other
constraints-driven layouts.
Note: any Modifier::key set on a returned view is overwritten by its
slot id so the slot’s identity is stable across frames.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ViewKind
impl !Send for ViewKind
impl !Sync for ViewKind
impl !UnwindSafe for ViewKind
impl Freeze for ViewKind
impl Unpin for ViewKind
impl UnsafeUnpin for ViewKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more