pub struct ResolvedTheme { /* private fields */ }Expand description
The flat, resolved read table for the active theme. styles[id]
is the fully-resolved Style for element id. Rebuilt on
theme/palette change; published via ArcSwap so the renderer’s
read is lock-free.
Implementations§
Source§impl ResolvedTheme
impl ResolvedTheme
Sourcepub fn get(&self, id: ElementId) -> Style
pub fn get(&self, id: ElementId) -> Style
The resolved style for id. Out-of-range ids resolve to the
empty style (an unregistered element is styleless, never a
panic).
Sourcepub fn version(&self) -> u64
pub fn version(&self) -> u64
Monotonic version, bumped each rebuild. Folds into
lattice_cells::MatrixVersion::theme so a palette change
rebuilds the cell matrix (design §7).
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for ResolvedTheme
impl Clone for ResolvedTheme
Source§fn clone(&self) -> ResolvedTheme
fn clone(&self) -> ResolvedTheme
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 ResolvedTheme
impl Debug for ResolvedTheme
Source§impl Default for ResolvedTheme
impl Default for ResolvedTheme
Source§impl PartialEq for ResolvedTheme
impl PartialEq for ResolvedTheme
impl StructuralPartialEq for ResolvedTheme
Auto Trait Implementations§
impl Freeze for ResolvedTheme
impl RefUnwindSafe for ResolvedTheme
impl Send for ResolvedTheme
impl Sync for ResolvedTheme
impl Unpin for ResolvedTheme
impl UnsafeUnpin for ResolvedTheme
impl UnwindSafe for ResolvedTheme
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