pub struct DashboardSpan {
pub text: String,
pub role: DashboardRole,
pub link: Option<LinkTarget>,
}Expand description
A run of text with a semantic role and an optional link target.
Fields§
§text: String§role: DashboardRole§link: Option<LinkTarget>Implementations§
Source§impl DashboardSpan
impl DashboardSpan
pub fn new(text: impl Into<String>, role: DashboardRole) -> Self
Sourcepub fn link(label: impl Into<String>, target: LinkTarget) -> Self
pub fn link(label: impl Into<String>, target: LinkTarget) -> Self
A link span: the visible label carries DashboardRole::Link and a
follow target.
Trait Implementations§
Source§impl Clone for DashboardSpan
impl Clone for DashboardSpan
Source§fn clone(&self) -> DashboardSpan
fn clone(&self) -> DashboardSpan
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 DashboardSpan
impl Debug for DashboardSpan
impl Eq for DashboardSpan
Source§impl PartialEq for DashboardSpan
impl PartialEq for DashboardSpan
impl StructuralPartialEq for DashboardSpan
Auto Trait Implementations§
impl Freeze for DashboardSpan
impl RefUnwindSafe for DashboardSpan
impl Send for DashboardSpan
impl Sync for DashboardSpan
impl Unpin for DashboardSpan
impl UnsafeUnpin for DashboardSpan
impl UnwindSafe for DashboardSpan
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.