pub struct ClickTarget {
pub url: String,
pub tooltip: Option<String>,
}Expand description
A hyperlink target attached to a node via a Mermaid click directive.
When rendered in a terminal that supports OSC 8, the node’s label text is
wrapped with the appropriate escape sequences so it becomes a clickable
hyperlink. In terminals that do not support OSC 8 the escape bytes are
emitted but harmlessly ignored (or stripped by crate::to_ascii in ASCII
mode).
§Examples
use mermaid_text::types::ClickTarget;
let ct = ClickTarget { url: "https://example.com".to_string(), tooltip: None };
assert_eq!(ct.url, "https://example.com");Fields§
§url: StringThe URL to open when the node label is clicked.
tooltip: Option<String>Optional tooltip text (from the third argument of click NodeId "url" "tooltip").
Not rendered in the terminal output but preserved for future use.
Trait Implementations§
Source§impl Clone for ClickTarget
impl Clone for ClickTarget
Source§fn clone(&self) -> ClickTarget
fn clone(&self) -> ClickTarget
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 ClickTarget
impl Debug for ClickTarget
Source§impl PartialEq for ClickTarget
impl PartialEq for ClickTarget
Source§fn eq(&self, other: &ClickTarget) -> bool
fn eq(&self, other: &ClickTarget) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ClickTarget
impl StructuralPartialEq for ClickTarget
Auto Trait Implementations§
impl Freeze for ClickTarget
impl RefUnwindSafe for ClickTarget
impl Send for ClickTarget
impl Sync for ClickTarget
impl Unpin for ClickTarget
impl UnsafeUnpin for ClickTarget
impl UnwindSafe for ClickTarget
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