pub struct Body<'a> {
pub content: Vec<BodyContent<'a>>,
}
Expand description
Document Body
This is the main document editing surface.
Fields
content: Vec<BodyContent<'a>>
Specifies the contents of the body of the document.
Implementations
sourceimpl<'a> Body<'a>
impl<'a> Body<'a>
pub fn push<T: Into<BodyContent<'a>>>(&mut self, content: T) -> &mut Self
pub fn text(&self) -> String
pub fn replace_text_simple<S>(&mut self, old: S, new: S) where
S: AsRef<str>,
pub fn replace_text<'b, T, S>(&mut self, dic: T) -> DocxResult<()> where
S: AsRef<str> + 'b,
T: IntoIterator<Item = &'b (S, S)> + Copy,
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Body<'a>
impl<'a> Send for Body<'a>
impl<'a> Sync for Body<'a>
impl<'a> Unpin for Body<'a>
impl<'a> UnwindSafe for Body<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more