pub struct DocumentTextRun {
pub text: String,
pub bold: bool,
pub italic: bool,
pub strikethrough: bool,
pub hyperlink: Option<String>,
}Expand description
带常用富文本属性的文本片段。
对应 OOXML <w:r> 元素,包含 <w:rPr> 属性(粗体/斜体/删除线等)。
无直接 Java 对应,是 easydoc-rust 自创的语义模型。
Fields§
§text: String原始文本。
bold: bool是否加粗。
italic: bool是否斜体。
strikethrough: bool是否删除线。
hyperlink: Option<String>可选超链接地址。
Trait Implementations§
Source§impl Clone for DocumentTextRun
impl Clone for DocumentTextRun
Source§fn clone(&self) -> DocumentTextRun
fn clone(&self) -> DocumentTextRun
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 DocumentTextRun
impl Debug for DocumentTextRun
Source§impl Default for DocumentTextRun
impl Default for DocumentTextRun
Source§fn default() -> DocumentTextRun
fn default() -> DocumentTextRun
Returns the “default value” for a type. Read more
impl Eq for DocumentTextRun
Source§impl PartialEq for DocumentTextRun
impl PartialEq for DocumentTextRun
impl StructuralPartialEq for DocumentTextRun
Auto Trait Implementations§
impl Freeze for DocumentTextRun
impl RefUnwindSafe for DocumentTextRun
impl Send for DocumentTextRun
impl Sync for DocumentTextRun
impl Unpin for DocumentTextRun
impl UnsafeUnpin for DocumentTextRun
impl UnwindSafe for DocumentTextRun
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.