Skip to main content

ferroui_base/data/
binding_priority.rs

1/// The priority of a binding or of a value set on a property.
2///
3/// Lower values take precedence over higher ones.
4#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
5#[repr(i32)]
6pub enum BindingPriority {
7    /// A value that comes from an animation.
8    Animation = -1,
9    /// A local value.
10    LocalValue = 0,
11    /// A triggered style value: a style whose selector has conditions such as
12    /// pseudo-classes or property matches.
13    StyleTrigger = 1,
14    /// A template binding or a value set by a template.
15    Template = 2,
16    /// A style value.
17    Style = 3,
18    /// The value is inherited from an ancestor element.
19    Inherited = 4,
20    /// The value is uninitialized.
21    Unset = i32::MAX,
22}
23
24impl Default for BindingPriority {
25    fn default() -> Self {
26        BindingPriority::LocalValue
27    }
28}