pub struct Run {
pub rsid_r_pr: Option<STLongHexNumber>,
pub rsid_del: Option<STLongHexNumber>,
pub rsid_r: Option<STLongHexNumber>,
pub r_pr: Option<Box<RunProperties>>,
pub run_content: Vec<RunContent>,
pub extra_attrs: HashMap<String, String>,
pub extra_children: Vec<PositionedNode>,
}Fields§
§rsid_r_pr: Option<STLongHexNumber>§rsid_del: Option<STLongHexNumber>§rsid_r: Option<STLongHexNumber>§r_pr: Option<Box<RunProperties>>§run_content: Vec<RunContent>§extra_attrs: HashMap<String, String>Unknown attributes captured for roundtrip fidelity.
extra_children: Vec<PositionedNode>Unknown child elements captured for roundtrip fidelity.
Implementations§
Source§impl Run
impl Run
Sourcepub fn set_italic(&mut self, italic: bool)
pub fn set_italic(&mut self, italic: bool)
Set italic on this run. Requires wml-styling feature.
Sourcepub fn set_page_break(&mut self)
pub fn set_page_break(&mut self)
Add a page break to this run.
Sourcepub fn set_color(&mut self, hex: &str)
pub fn set_color(&mut self, hex: &str)
Set the text color on this run (hex string, e.g. “FF0000” for red).
Sourcepub fn set_font_size(&mut self, half_points: i64)
pub fn set_font_size(&mut self, half_points: i64)
Set the font size in half-points (e.g. 48 = 24pt).
Sourcepub fn set_strikethrough(&mut self, strike: bool)
pub fn set_strikethrough(&mut self, strike: bool)
Set strikethrough on this run.
Sourcepub fn set_underline(&mut self, style: STUnderline)
pub fn set_underline(&mut self, style: STUnderline)
Set underline style on this run.
Sourcepub fn set_properties(&mut self, props: RunProperties)
pub fn set_properties(&mut self, props: RunProperties)
Set run properties.
Sourcepub fn add_drawing(&mut self, drawing: CTDrawing)
pub fn add_drawing(&mut self, drawing: CTDrawing)
Add a drawing to this run’s inner content.
Sourcepub fn add_footnote_ref(&mut self, id: i64)
pub fn add_footnote_ref(&mut self, id: i64)
Add a footnote reference to this run.
Sourcepub fn add_endnote_ref(&mut self, id: i64)
pub fn add_endnote_ref(&mut self, id: i64)
Add an endnote reference to this run.
Sourcepub fn add_comment_ref(&mut self, id: i64)
pub fn add_comment_ref(&mut self, id: i64)
Add a comment reference to this run.
Sourcepub fn set_shadow(&mut self, on: bool)
pub fn set_shadow(&mut self, on: bool)
Set shadow effect on this run.
Maps to <w:shadow/> in run properties.
ECMA-376 Part 1, Section 17.3.2.31 (w:shadow).
Sourcepub fn set_outline(&mut self, on: bool)
pub fn set_outline(&mut self, on: bool)
Set outline (hollow) text effect on this run.
Maps to <w:outline/> in run properties.
ECMA-376 Part 1, Section 17.3.2.23 (w:outline).
Sourcepub fn set_emboss(&mut self, on: bool)
pub fn set_emboss(&mut self, on: bool)
Set emboss effect on this run.
Maps to <w:emboss/> in run properties.
ECMA-376 Part 1, Section 17.3.2.13 (w:emboss).
Sourcepub fn set_imprint(&mut self, on: bool)
pub fn set_imprint(&mut self, on: bool)
Set imprint (engrave) effect on this run.
Maps to <w:imprint/> in run properties.
ECMA-376 Part 1, Section 17.3.2.18 (w:imprint).
Sourcepub fn set_small_caps(&mut self, on: bool)
pub fn set_small_caps(&mut self, on: bool)
Set small caps on this run.
Maps to <w:smallCaps/> in run properties.
ECMA-376 Part 1, Section 17.3.2.33 (w:smallCaps).
Sourcepub fn set_all_caps(&mut self, on: bool)
pub fn set_all_caps(&mut self, on: bool)
Set all caps on this run.
Maps to <w:caps/> in run properties.
ECMA-376 Part 1, Section 17.3.2.5 (w:caps).
Sourcepub fn set_vanish(&mut self, on: bool)
pub fn set_vanish(&mut self, on: bool)
Set hidden text (vanish) on this run.
Maps to <w:vanish/> in run properties. Hidden text is not rendered
unless the application is set to show hidden text.
ECMA-376 Part 1, Section 17.3.2.41 (w:vanish).
Sourcepub fn set_double_strike(&mut self, on: bool)
pub fn set_double_strike(&mut self, on: bool)
Set double strikethrough on this run.
Maps to <w:dstrike/> in run properties.
ECMA-376 Part 1, Section 17.3.2.9 (w:dstrike).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Run
impl<'de> Deserialize<'de> for Run
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromXml for Run
impl FromXml for Run
Source§fn from_xml<R: BufRead>(
reader: &mut Reader<R>,
start_tag: &BytesStart<'_>,
is_empty: bool,
) -> Result<Self, ParseError>
fn from_xml<R: BufRead>( reader: &mut Reader<R>, start_tag: &BytesStart<'_>, is_empty: bool, ) -> Result<Self, ParseError>
Source§impl RunExt for Run
impl RunExt for Run
Source§fn properties(&self) -> Option<&RunProperties>
fn properties(&self) -> Option<&RunProperties>
Source§fn has_page_break(&self) -> bool
fn has_page_break(&self) -> bool
Source§fn is_underline(&self) -> bool
fn is_underline(&self) -> bool
Source§fn is_strikethrough(&self) -> bool
fn is_strikethrough(&self) -> bool
Source§fn has_images(&self) -> bool
fn has_images(&self) -> bool
Source§fn footnote_ref(&self) -> Option<&FootnoteEndnoteRef>
fn footnote_ref(&self) -> Option<&FootnoteEndnoteRef>
Source§fn endnote_ref(&self) -> Option<&FootnoteEndnoteRef>
fn endnote_ref(&self) -> Option<&FootnoteEndnoteRef>
Source§impl RunResolveExt for Run
Available on crate feature wml-styling only.
impl RunResolveExt for Run
wml-styling only.Source§fn resolved_is_bold(&self, ctx: &StyleContext) -> bool
fn resolved_is_bold(&self, ctx: &StyleContext) -> bool
Source§fn resolved_is_italic(&self, ctx: &StyleContext) -> bool
fn resolved_is_italic(&self, ctx: &StyleContext) -> bool
Source§fn resolved_font_size_half_points(&self, ctx: &StyleContext) -> Option<u32>
fn resolved_font_size_half_points(&self, ctx: &StyleContext) -> Option<u32>
Source§fn resolved_font_ascii(&self, ctx: &StyleContext) -> Option<String>
fn resolved_font_ascii(&self, ctx: &StyleContext) -> Option<String>
Source§fn resolved_color_hex(&self, ctx: &StyleContext) -> Option<String>
fn resolved_color_hex(&self, ctx: &StyleContext) -> Option<String>
Source§fn resolved_is_underline(&self, ctx: &StyleContext) -> bool
fn resolved_is_underline(&self, ctx: &StyleContext) -> bool
Source§fn resolved_is_strikethrough(&self, ctx: &StyleContext) -> bool
fn resolved_is_strikethrough(&self, ctx: &StyleContext) -> bool
Source§fn resolved_is_double_strikethrough(&self, ctx: &StyleContext) -> bool
fn resolved_is_double_strikethrough(&self, ctx: &StyleContext) -> bool
Source§fn resolved_is_all_caps(&self, ctx: &StyleContext) -> bool
fn resolved_is_all_caps(&self, ctx: &StyleContext) -> bool
Source§fn resolved_is_small_caps(&self, ctx: &StyleContext) -> bool
fn resolved_is_small_caps(&self, ctx: &StyleContext) -> bool
<w:vanish>) through direct → style chain → defaults.Source§fn resolved_highlight_color(
&self,
ctx: &StyleContext,
) -> Option<STHighlightColor>
fn resolved_highlight_color( &self, ctx: &StyleContext, ) -> Option<STHighlightColor>
Source§fn resolved_vertical_alignment(
&self,
ctx: &StyleContext,
) -> Option<STVerticalAlignRun>
fn resolved_vertical_alignment( &self, ctx: &StyleContext, ) -> Option<STVerticalAlignRun>
Source§impl ToXml for Run
impl ToXml for Run
Source§fn write_attrs<'a>(&self, start: BytesStart<'a>) -> BytesStart<'a>
fn write_attrs<'a>(&self, start: BytesStart<'a>) -> BytesStart<'a>
Source§fn write_children<W: Write>(
&self,
writer: &mut Writer<W>,
) -> Result<(), SerializeError>
fn write_children<W: Write>( &self, writer: &mut Writer<W>, ) -> Result<(), SerializeError>
Source§fn is_empty_element(&self) -> bool
fn is_empty_element(&self) -> bool
Source§fn write_element<W>(
&self,
tag: &str,
writer: &mut Writer<W>,
) -> Result<(), SerializeError>where
W: Write,
fn write_element<W>(
&self,
tag: &str,
writer: &mut Writer<W>,
) -> Result<(), SerializeError>where
W: Write,
<tag attrs>children</tag> or <tag attrs/>.