pub struct Text<'a> {
pub space: Option<TextSpace>,
pub text: Cow<'a, str>,
}
Expand description
Literal Text
A literal text that shall be displayed in the document.
use docx_rust::document::{Text, TextSpace};
let text = Text::from("text");
let text = Text::from(String::from("text"));
let text = Text::from(("text", TextSpace::Preserve));
Fields§
§space: Option<TextSpace>
Specifies how to handle whitespace
text: Cow<'a, str>
Specifies a literal text
Trait Implementations§
Source§impl<'a> From<Text<'a>> for RunContent<'a>
impl<'a> From<Text<'a>> for RunContent<'a>
Source§fn from(original: Text<'a>) -> RunContent<'a>
fn from(original: Text<'a>) -> RunContent<'a>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for Text<'a>
impl<'a> RefUnwindSafe for Text<'a>
impl<'a> Send for Text<'a>
impl<'a> Sync for Text<'a>
impl<'a> Unpin for Text<'a>
impl<'a> UnwindSafe for Text<'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