pub struct Hyperlink<'a> {
pub id: Option<Cow<'a, str>>,
pub anchor: Option<Cow<'a, str>>,
pub content: Option<Run<'a>>,
pub bidirectional_embedding: Option<BidirectionalEmbedding<'a>>,
}
Expand description
The root element of a hyperlink within the paragraph
Fields§
§id: Option<Cow<'a, str>>
Specifies the ID of the relationship in the relationships part for an external link.
anchor: Option<Cow<'a, str>>
Specifies the name of a bookmark within the document.
content: Option<Run<'a>>
Link content
bidirectional_embedding: Option<BidirectionalEmbedding<'a>>
Implementations§
Source§impl<'a> Hyperlink<'a>
impl<'a> Hyperlink<'a>
pub fn id<T: Into<Cow<'a, str>>>(self, value: T) -> Self
pub fn anchor<T: Into<Cow<'a, str>>>(self, value: T) -> Self
pub fn content<T: Into<Run<'a>>>(self, value: T) -> Self
pub fn text(&self) -> String
pub fn iter_text(&self) -> Box<dyn Iterator<Item = &Cow<'a, str>> + '_>
pub fn iter_text_mut( &mut self, ) -> Box<dyn Iterator<Item = &mut Cow<'a, str>> + '_>
Trait Implementations§
Source§impl<'a> From<Hyperlink<'a>> for ParagraphContent<'a>
impl<'a> From<Hyperlink<'a>> for ParagraphContent<'a>
Source§fn from(original: Hyperlink<'a>) -> ParagraphContent<'a>
fn from(original: Hyperlink<'a>) -> ParagraphContent<'a>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for Hyperlink<'a>
impl<'a> RefUnwindSafe for Hyperlink<'a>
impl<'a> Send for Hyperlink<'a>
impl<'a> Sync for Hyperlink<'a>
impl<'a> Unpin for Hyperlink<'a>
impl<'a> UnwindSafe for Hyperlink<'a>
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