pub struct ProgressElement {
pub value: f64,
pub total: f64,
pub label: Option<String>,
pub tint: Option<ColorValue>,
pub color: Option<ColorValue>,
pub bar_style: Option<ProgressStyle>,
pub start_at: Option<u64>,
pub end_at: Option<u64>,
pub track_color: Option<ColorValue>,
pub thickness: Option<f64>,
pub style: ElementStyle,
}Expand description
Linear or circular progress indicator.
Fields§
§value: f64Current value. Clamped to 0..=total by renderers.
total: f64Denominator for the ratio. Default 1.0.
label: Option<String>Caption above the bar. Always set on Android so hosts never show null.
tint: Option<ColorValue>Accent / fill color for the completed portion.
color: Option<ColorValue>Track / label color.
bar_style: Option<ProgressStyle>linear (default) or circular.
start_at: Option<u64>Unix ms: with endAt, the bar fills by itself between the two times (no refresh needed on Apple / desktop).
WidgetKit animates it live only for spans up to 10 minutes (a live bar keeps Notification
Center busy); a longer span shows the value at each timeline entry / reload.
end_at: Option<u64>Unix ms the time-driven bar reaches full (see startAt).
track_color: Option<ColorValue>Color of the unfilled track.
thickness: Option<f64>Bar height (linear) or ring width (circular) in points.
style: ElementStyleShared visual style (padding, background, frame, …).
Trait Implementations§
Source§impl Clone for ProgressElement
impl Clone for ProgressElement
Source§impl Debug for ProgressElement
impl Debug for ProgressElement
Source§impl Default for ProgressElement
impl Default for ProgressElement
Source§impl<'de> Deserialize<'de> for ProgressElement
impl<'de> Deserialize<'de> for ProgressElement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<ProgressElement> for WidgetElement
impl From<ProgressElement> for WidgetElement
Source§fn from(value: ProgressElement) -> Self
fn from(value: ProgressElement) -> Self
Source§impl JsonSchema for ProgressElement
Available on crate feature schema only.
impl JsonSchema for ProgressElement
schema only.Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more