pub struct StyleMeta {
pub link: Option<Arc<str>>,
pub link_id: Option<Arc<str>>,
pub meta: Option<Arc<BTreeMap<String, MetaValue>>>,
}Expand description
Metadata for styles, used for hyperlinks and custom data.
This is kept separate from Style to preserve Style: Copy for the
common case. Only segments with links or metadata need a StyleMeta.
Uses BTreeMap instead of HashMap for deterministic ordering,
which is important for segment simplification and serialization.
Fields§
§link: Option<Arc<str>>Hyperlink URL (terminal OSC 8 escape sequence).
link_id: Option<Arc<str>>Link ID for grouping multiple segments with the same link.
meta: Option<Arc<BTreeMap<String, MetaValue>>>Custom metadata (used by Textual for event handlers).
Implementations§
Trait Implementations§
impl Eq for StyleMeta
impl StructuralPartialEq for StyleMeta
Auto Trait Implementations§
impl Freeze for StyleMeta
impl RefUnwindSafe for StyleMeta
impl Send for StyleMeta
impl Sync for StyleMeta
impl Unpin for StyleMeta
impl UnwindSafe for StyleMeta
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.