pub struct WidgetStateProperty<T> { /* private fields */ }Implementations§
Source§impl<T> WidgetStateProperty<T>
impl<T> WidgetStateProperty<T>
pub fn new(default: T) -> Self
Sourcepub fn when(self, states: WidgetStates, value: T) -> Self
pub fn when(self, states: WidgetStates, value: T) -> Self
Adds an override that applies when states is a subset of the current widget state.
Precedence rule: the last matching override wins.
pub fn resolve(&self, states: WidgetStates) -> &T
Trait Implementations§
Source§impl<T: Clone> Clone for WidgetStateProperty<T>
impl<T: Clone> Clone for WidgetStateProperty<T>
Source§fn clone(&self) -> WidgetStateProperty<T>
fn clone(&self) -> WidgetStateProperty<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for WidgetStateProperty<T>where
T: Freeze,
impl<T> RefUnwindSafe for WidgetStateProperty<T>where
T: RefUnwindSafe,
impl<T> Send for WidgetStateProperty<T>where
T: Send,
impl<T> Sync for WidgetStateProperty<T>where
T: Sync,
impl<T> Unpin for WidgetStateProperty<T>where
T: Unpin,
impl<T> UnsafeUnpin for WidgetStateProperty<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for WidgetStateProperty<T>where
T: UnwindSafe + RefUnwindSafe,
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