pub enum TextDirection {
TopToBottom,
BottomToTop,
}Expand description
A table cell’s text flow direction (w:tcPr/w:textDirection, CT_TextDirection,
ST_TextDirection) — used to rotate a cell’s text 90 degrees, a common way to fit a narrow
column header (e.g. a label running down a data table’s leftmost column).
ST_TextDirection actually defines many more values than these two (lr, tb, lrV, tbV,
lrTb, tbRl, btLr, lrTbV, tbLrV, tbRlV — a mix of modern WordprocessingML values and
legacy WordPerfect-compatibility ones); only the two rotated options exposed by Word’s own
Table Properties dialog (under Text Direction) are modeled. The normal, non-rotated flow
(lrTb) isn’t modeled as its own variant, since TableCell.text_direction: Option<TextDirection> already expresses it via None (omitting w:textDirection entirely
achieves the same visual result), same convention as VerticalAlign’s
"baseline"/Highlight’s "none".
Variants§
TopToBottom
Text reads top-to-bottom, columns flowing right-to-left — Word’s “Rotate all text 90°”
(ST_TextDirection’s tbRl).
BottomToTop
Text reads bottom-to-top, columns flowing left-to-right — Word’s “Rotate all text 270°”
(ST_TextDirection’s btLr).
Implementations§
Source§impl TextDirection
impl TextDirection
Sourcepub fn attribute_value(self) -> &'static str
pub fn attribute_value(self) -> &'static str
This text direction’s w:textDirection/val value (ST_TextDirection).
Sourcepub fn from_attribute_value(value: &str) -> Option<TextDirection>
pub fn from_attribute_value(value: &str) -> Option<TextDirection>
Parses a w:textDirection/val value (ST_TextDirection) back into a TextDirection,
or None for "lrTb" or any other unmodeled value.
Trait Implementations§
Source§impl Clone for TextDirection
impl Clone for TextDirection
Source§fn clone(&self) -> TextDirection
fn clone(&self) -> TextDirection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TextDirection
Source§impl Debug for TextDirection
impl Debug for TextDirection
impl Eq for TextDirection
Source§impl PartialEq for TextDirection
impl PartialEq for TextDirection
impl StructuralPartialEq for TextDirection
Auto Trait Implementations§
impl Freeze for TextDirection
impl RefUnwindSafe for TextDirection
impl Send for TextDirection
impl Sync for TextDirection
impl Unpin for TextDirection
impl UnsafeUnpin for TextDirection
impl UnwindSafe for TextDirection
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
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
key and return true if they are equal.