pub enum LineBreakPolicy {
InsertWordBreak,
SplitParagraph,
}Expand description
Policy for handling newline characters (\n, \r\n) in resolved variable values.
DOCX ignores literal newline characters inside <w:t> elements. This policy
controls how the render layer converts them into visible line breaks.
Variants§
InsertWordBreak
Insert a Word soft line break (<w:br w:type="textWrapping"/>) between
each line segment.
All segments stay within the same <w:p> and <w:r>. This is the
default because it requires no structural changes to the paragraph.
SplitParagraph
Split the containing <w:p> into N separate paragraphs — one per line
segment — each inheriting the <w:pPr> and <w:rPr> of the original.
Use when downstream consumers need true paragraph boundaries, e.g. for independent paragraph formatting or mail-merge scenarios.
Trait Implementations§
Source§impl Clone for LineBreakPolicy
impl Clone for LineBreakPolicy
impl Copy for LineBreakPolicy
Source§impl Debug for LineBreakPolicy
impl Debug for LineBreakPolicy
Source§impl Default for LineBreakPolicy
impl Default for LineBreakPolicy
impl Eq for LineBreakPolicy
Source§impl PartialEq for LineBreakPolicy
impl PartialEq for LineBreakPolicy
impl StructuralPartialEq for LineBreakPolicy
Auto Trait Implementations§
impl Forget for LineBreakPolicy
impl Freeze for LineBreakPolicy
impl Move for LineBreakPolicy
impl RefUnwindSafe for LineBreakPolicy
impl Send for LineBreakPolicy
impl Sync for LineBreakPolicy
impl Unpin for LineBreakPolicy
impl UnsafeUnpin for LineBreakPolicy
impl UnwindSafe for LineBreakPolicy
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
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.