pub struct CT_TextBody {
pub body_properties: CT_TextBodyProperties,
/* private fields */
}Expand description
The a:txBody shell with typed body properties and opaque later text stages.
Fields§
§body_properties: CT_TextBodyPropertiesImplementations§
Source§impl CT_TextBody
impl CT_TextBody
Sourcepub fn from_xml(xml: &[u8]) -> Result<Self>
pub fn from_xml(xml: &[u8]) -> Result<Self>
Parses a complete a:txBody while retaining later text stages.
Sourcepub fn from_xml_as(xml: &[u8], root_local_name: &[u8]) -> Result<Self>
pub fn from_xml_as(xml: &[u8], root_local_name: &[u8]) -> Result<Self>
Parses a complete text body under a caller-selected root local name.
Sourcepub fn to_xml(&self) -> Result<Vec<u8>>
pub fn to_xml(&self) -> Result<Vec<u8>>
Writes the shell with canonical outer prefixes and schema order.
Sourcepub fn write_xml<W: Write>(&self, writer: &mut Writer<W>) -> Result<()>
pub fn write_xml<W: Write>(&self, writer: &mut Writer<W>) -> Result<()>
Writes the shell into an existing XML writer.
Sourcepub fn write_xml_as<W: Write>(
&self,
writer: &mut Writer<W>,
tag: &str,
) -> Result<()>
pub fn write_xml_as<W: Write>( &self, writer: &mut Writer<W>, tag: &str, ) -> Result<()>
Writes the text body using a caller-selected OOXML wrapper tag.
Sourcepub fn plain_text(&self) -> String
pub fn plain_text(&self) -> String
Returns plain text in paragraph and text-content order.
pub fn has_list_style(&self) -> bool
pub fn list_style(&self) -> Option<&CT_TextListStyle>
pub fn paragraph_count(&self) -> usize
pub fn paragraphs(&self) -> &[CT_TextParagraph]
Sourcepub fn set_text(&mut self, text: &str)
pub fn set_text(&mut self, text: &str)
Replaces all text content while retaining body-level state.
Sourcepub fn paragraph_mut(&mut self, index: usize) -> Option<&mut CT_TextParagraph>
pub fn paragraph_mut(&mut self, index: usize) -> Option<&mut CT_TextParagraph>
Returns one paragraph for in-place mutation.
Sourcepub fn add_paragraph(&mut self) -> &mut CT_TextParagraph
pub fn add_paragraph(&mut self) -> &mut CT_TextParagraph
Appends one empty paragraph after all existing paragraphs.
Sourcepub fn move_content_to(&mut self, destination: &mut Self)
pub fn move_content_to(&mut self, destination: &mut Self)
Moves visible typed paragraphs to destination, retaining body-level
state and leaving one empty paragraph in this body.
pub fn raw_children(&self) -> &OrderedRawChildren
Trait Implementations§
Source§impl Clone for CT_TextBody
impl Clone for CT_TextBody
Source§fn clone(&self) -> CT_TextBody
fn clone(&self) -> CT_TextBody
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 CT_TextBody
impl Debug for CT_TextBody
Source§impl Default for CT_TextBody
impl Default for CT_TextBody
impl Eq for CT_TextBody
Source§impl PartialEq for CT_TextBody
impl PartialEq for CT_TextBody
impl StructuralPartialEq for CT_TextBody
Auto Trait Implementations§
impl Freeze for CT_TextBody
impl RefUnwindSafe for CT_TextBody
impl Send for CT_TextBody
impl Sync for CT_TextBody
impl Unpin for CT_TextBody
impl UnsafeUnpin for CT_TextBody
impl UnwindSafe for CT_TextBody
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