pub struct Element { /* private fields */ }
Expand description
A hypertext element: a formatted string with an optional link target.
Implementations§
Source§impl Element
impl Element
Sourcepub fn new(text: String, style: Style, link_target: Option<String>) -> Element
pub fn new(text: String, style: Style, link_target: Option<String>) -> Element
Creates a new element with the given text, style and optional link target.
Sourcepub fn plain(text: String) -> Element
pub fn plain(text: String) -> Element
Creates an element with the given text, with the default style and without a link target.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
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