pub enum MarkColor {
Red,
Orange,
Yellow,
Green,
Blue,
Purple,
Brown,
}Expand description
The colour of a highlight — the palette Editor::set_mark_color writes.
Obsidian’s spelling, which is what Twig reads and writes: a large-circle
emoji immediately after the opening ==, so ==🔴 text== is a highlight
whose text is text and whose colour is MarkColor::Red. The emoji is
spelling, not content — it is stripped from the highlighted text and
carried as the mark’s data-color attribute, which is where a
Document::query for mark[data-color=red] finds it.
An enum rather than a string because the palette is closed: a name Twig has
no emoji for is not a colour it can write, and an emoji it does not read
back is text. The C ABI takes the name — MarkColor::as_str is it, and is
exactly the attribute value.
Variants§
Implementations§
Trait Implementations§
impl Copy for MarkColor
impl Eq for MarkColor
impl StructuralPartialEq for MarkColor
Auto Trait Implementations§
impl Freeze for MarkColor
impl RefUnwindSafe for MarkColor
impl Send for MarkColor
impl Sync for MarkColor
impl Unpin for MarkColor
impl UnsafeUnpin for MarkColor
impl UnwindSafe for MarkColor
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