Struct cursive_markup::Element
source · [−]pub struct Element { /* private fields */ }
Expand description
A hypertext element: a formatted string with an optional link target.
Implementations
sourceimpl 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 RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more