pub struct StyleId(/* private fields */);Expand description
A compact identity for one normalized, theme-scoped style.
Application code receives IDs from Style::id. Integer construction is not part of the
supported application API, and Style exposes no integer constructor.
Implementations§
Source§impl StyleId
impl StyleId
Sourcepub const fn is_unresolved(self) -> bool
pub const fn is_unresolved(self) -> bool
Returns whether this is the empty style sentinel.
Sourcepub fn to_class_name(self) -> String
pub fn to_class_name(self) -> String
Encodes all identity bits as a lowercase CSS-safe class name.
The empty sentinel encodes mechanically as pc_0; use Style::class_name
when rendering a Style, because Style::EMPTY intentionally renders
no class at all.
Trait Implementations§
impl Copy for StyleId
impl Eq for StyleId
Source§impl Ord for StyleId
impl Ord for StyleId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for StyleId
impl PartialOrd for StyleId
impl StructuralPartialEq for StyleId
Auto Trait Implementations§
impl Freeze for StyleId
impl RefUnwindSafe for StyleId
impl Send for StyleId
impl Sync for StyleId
impl Unpin for StyleId
impl UnsafeUnpin for StyleId
impl UnwindSafe for StyleId
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