pub struct Classes { /* private fields */ }Expand description
Classes are string identifier that can be set on widget/Ui.
This can be used by styling engine to compute a different style based on the set of classes present on the widget/Ui.
Trait Implementations§
Source§impl HasClasses for Classes
impl HasClasses for Classes
fn classes(&self) -> &Classes
fn classes_mut(&mut self) -> &mut Classes
Source§fn with_class(self, class: impl Into<ClassName>) -> Selfwhere
Self: Sized,
fn with_class(self, class: impl Into<ClassName>) -> Selfwhere
Self: Sized,
Add the given class by consuming
selfSource§fn with_class_if(self, class: impl Into<ClassName>, condition: bool) -> Selfwhere
Self: Sized,
fn with_class_if(self, class: impl Into<ClassName>, condition: bool) -> Selfwhere
Self: Sized,
Add the given class by consuming
self if the condition is trueSource§fn add_class(&mut self, class: impl Into<ClassName>) -> &mut Selfwhere
Self: Sized,
fn add_class(&mut self, class: impl Into<ClassName>) -> &mut Selfwhere
Self: Sized,
Add the given class in-place
Auto Trait Implementations§
impl Freeze for Classes
impl RefUnwindSafe for Classes
impl Send for Classes
impl Sync for Classes
impl Unpin for Classes
impl UnsafeUnpin for Classes
impl UnwindSafe for Classes
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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