pub struct StyleProps { /* private fields */ }Expand description
Style properties after all matching rules have been layered.
Clones share their storage, so handing out a theme’s remembered style every frame copies nothing.
Implementations§
Source§impl StyleProps
impl StyleProps
Sourcepub fn paint(&self, key: &str) -> Option<Paint>
pub fn paint(&self, key: &str) -> Option<Paint>
The paint stored under key, if key holds a colour.
Sourcepub fn pair(&self, key: &str) -> Option<(u16, u16)>
pub fn pair(&self, key: &str) -> Option<(u16, u16)>
The (vertical, horizontal) pair stored under key.
Sourcepub fn word(&self, key: &str) -> Option<&'static str>
pub fn word(&self, key: &str) -> Option<&'static str>
The word stored under key, such as a scrollbar style.
Sourcepub fn is_animated(&self) -> bool
pub fn is_animated(&self) -> bool
Whether any property uses an animated paint.
Trait Implementations§
Source§impl Clone for StyleProps
impl Clone for StyleProps
Source§fn clone(&self) -> StyleProps
fn clone(&self) -> StyleProps
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 moreSource§impl Debug for StyleProps
impl Debug for StyleProps
Source§impl Default for StyleProps
impl Default for StyleProps
Source§fn default() -> StyleProps
fn default() -> StyleProps
Returns the “default value” for a type. Read more
Source§impl PartialEq for StyleProps
impl PartialEq for StyleProps
impl StructuralPartialEq for StyleProps
Auto Trait Implementations§
impl Freeze for StyleProps
impl RefUnwindSafe for StyleProps
impl Send for StyleProps
impl Sync for StyleProps
impl Unpin for StyleProps
impl UnsafeUnpin for StyleProps
impl UnwindSafe for StyleProps
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more