pub struct ElementName(/* private fields */);Expand description
A theme element’s dotted, hierarchical name (markdown.heading.1).
Fallback walks the dotted parents (markdown.heading.1 →
markdown.heading → markdown) when the more-specific element is
unstyled by the active theme.
Implementations§
Source§impl ElementName
impl ElementName
Sourcepub const fn from_static(s: &'static str) -> Self
pub const fn from_static(s: &'static str) -> Self
Construct from a &'static str (the builtin path).
pub fn as_str(&self) -> &str
Sourcepub fn parent(&self) -> Option<ElementName>
pub fn parent(&self) -> Option<ElementName>
The dotted parent, if any: "a.b.c" → "a.b", "a" → None.
Used for hierarchical fallback at resolution time.
Trait Implementations§
Source§impl Clone for ElementName
impl Clone for ElementName
Source§fn clone(&self) -> ElementName
fn clone(&self) -> ElementName
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 ElementName
impl Debug for ElementName
Source§impl Display for ElementName
impl Display for ElementName
impl Eq for ElementName
Source§impl From<&'static str> for ElementName
impl From<&'static str> for ElementName
Source§impl From<String> for ElementName
impl From<String> for ElementName
Source§impl Hash for ElementName
impl Hash for ElementName
Source§impl PartialEq for ElementName
impl PartialEq for ElementName
impl StructuralPartialEq for ElementName
Auto Trait Implementations§
impl Freeze for ElementName
impl RefUnwindSafe for ElementName
impl Send for ElementName
impl Sync for ElementName
impl Unpin for ElementName
impl UnsafeUnpin for ElementName
impl UnwindSafe for ElementName
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