pub enum WidgetKind<'a> {
Show 37 variants
Panel,
Label(&'a str),
Button(&'a str),
ProgressBar {
value: f32,
},
Toggle {
label: &'a str,
on: bool,
},
Checkbox {
label: &'a str,
checked: bool,
},
Slider {
value: f32,
min: f32,
max: f32,
},
ValueLabel {
label: &'a str,
value: i32,
},
IconButton {
icon: char,
label: &'a str,
},
List {
items: &'a [&'a str],
selected: usize,
offset: usize,
visible_rows: usize,
},
ScrollView {
offset_y: i32,
content_h: u32,
},
Tabs {
labels: &'a [&'a str],
selected: usize,
},
Dialog {
title: &'a str,
body: &'a str,
},
Toast {
text: &'a str,
ttl_ms: u32,
},
Meter {
value: f32,
min: f32,
max: f32,
},
ArcGauge {
value: f32,
min: f32,
max: f32,
start_deg: i32,
end_deg: i32,
thickness: u8,
antialias: bool,
major_ticks: u8,
minor_ticks: u8,
show_value: bool,
},
Gauge {
value: f32,
min: f32,
max: f32,
major_ticks: u8,
minor_ticks: u8,
show_value: bool,
},
GaugeNeedle {
value: f32,
min: f32,
max: f32,
start_deg: i32,
end_deg: i32,
},
Chart {
values: &'a [f32],
min: f32,
max: f32,
thickness: u8,
fill_under: bool,
markers: bool,
mode: ChartMode,
show_grid: bool,
show_axes: bool,
show_labels: bool,
},
Spinner {
phase: f32,
},
Dropdown {
items: &'a [&'a str],
selected: usize,
open: bool,
},
Roller {
items: &'a [&'a str],
selected: usize,
},
Table {
rows: &'a [&'a [&'a str]],
separators: bool,
cell_padding: u8,
align: TextAlign,
},
TextArea {
text_buf: [u8; 128],
text_len: u8,
cursor: usize,
placeholder: &'a str,
selection: Option<(usize, usize)>,
cursor_visible: bool,
read_only: bool,
single_line: bool,
accept_newline: bool,
},
Keyboard {
keys: &'a [char],
selected: usize,
cols: u8,
alt_keys: Option<&'a [char]>,
layout: KeyboardLayout,
target: Option<WidgetId>,
},
Image {
image: ImageRef<'a>,
fit: ImageFit,
},
Border,
Spacer,
Menu {
items: &'a [&'a str],
selected: usize,
},
PeekReveal {
icon: ImageRef<'a>,
title: &'a str,
subtitle: &'a str,
progress: f32,
},
GlanceTile {
icon: char,
title: &'a str,
subtitle: &'a str,
highlighted: bool,
},
CardDeck {
titles: &'a [&'a str],
selected: usize,
},
Reel {
player: ReelPlayer<'a>,
fit: ImageFit,
},
StateSurface {
state: SurfaceState,
title: &'a str,
message: &'a str,
action: Option<&'a str>,
busy_phase: f32,
},
HeadsUpBanner {
level: NotificationLevel,
text: &'a str,
ttl_ms: u32,
},
NotificationActionSheet {
level: NotificationLevel,
title: &'a str,
body: &'a str,
actions: &'a [&'a str],
selected: usize,
open: bool,
},
FeedTimeline {
items: &'a [&'a str],
selected: usize,
offset: usize,
visible_rows: usize,
expanded: bool,
},
}Variants§
Panel
Label(&'a str)
Button(&'a str)
ProgressBar
Toggle
Checkbox
Slider
ValueLabel
IconButton
List
ScrollView
Tabs
Dialog
Toast
Meter
ArcGauge
Fields
Gauge
GaugeNeedle
Chart
Fields
Spinner
Dropdown
Roller
Table
TextArea
Fields
Keyboard
Fields
§
layout: KeyboardLayoutImage
Border
Spacer
Menu
PeekReveal
GlanceTile
CardDeck
Reel
StateSurface
HeadsUpBanner
NotificationActionSheet
Fields
§
level: NotificationLevelFeedTimeline
Implementations§
Trait Implementations§
Source§impl<'a> Clone for WidgetKind<'a>
impl<'a> Clone for WidgetKind<'a>
Source§fn clone(&self) -> WidgetKind<'a>
fn clone(&self) -> WidgetKind<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for WidgetKind<'a>
Source§impl<'a> Debug for WidgetKind<'a>
impl<'a> Debug for WidgetKind<'a>
Source§impl<'a> Default for WidgetKind<'a>
impl<'a> Default for WidgetKind<'a>
Source§fn default() -> WidgetKind<'a>
fn default() -> WidgetKind<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> PartialEq for WidgetKind<'a>
impl<'a> PartialEq for WidgetKind<'a>
Source§fn eq(&self, other: &WidgetKind<'a>) -> bool
fn eq(&self, other: &WidgetKind<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for WidgetKind<'a>
Auto Trait Implementations§
impl<'a> Freeze for WidgetKind<'a>
impl<'a> RefUnwindSafe for WidgetKind<'a>
impl<'a> Send for WidgetKind<'a>
impl<'a> Sync for WidgetKind<'a>
impl<'a> Unpin for WidgetKind<'a>
impl<'a> UnsafeUnpin for WidgetKind<'a>
impl<'a> UnwindSafe for WidgetKind<'a>
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.