pub struct DocElement {
pub start_index: i64,
pub end_index: i64,
pub kind: ElementKind,
pub path: Vec<usize>,
pub style: Option<String>,
pub list_id: Option<String>,
pub rows: Option<i64>,
pub columns: Option<i64>,
pub text: String,
}Expand description
One structural element, flattened out of the document tree.
Fields§
§start_index: i64Inclusive start, in UTF-16 code units, within this tab’s body segment.
end_index: i64Exclusive end, likewise.
kind: ElementKindWhich kind of element this is.
path: Vec<usize>Structural address: [3] is the 4th top-level element, [3, 0, 1, 0]
the 1st element of row 0, cell 1 of that table. path.len() - 1 is
the nesting depth, which is what a renderer indents by.
style: Option<String>A paragraph’s namedStyleType (HEADING_1, NORMAL_TEXT, …).
list_id: Option<String>A list item’s listId.
rows: Option<i64>A table’s row count.
columns: Option<i64>A table’s column count.
text: StringA paragraph’s text, with its terminating newline removed. Empty for every non-paragraph kind.
Implementations§
Trait Implementations§
Source§impl Clone for DocElement
impl Clone for DocElement
Source§impl Debug for DocElement
impl Debug for DocElement
impl Eq for DocElement
Source§impl PartialEq for DocElement
impl PartialEq for DocElement
Source§impl Serialize for DocElement
impl Serialize for DocElement
impl StructuralPartialEq for DocElement
Auto Trait Implementations§
impl Freeze for DocElement
impl RefUnwindSafe for DocElement
impl Send for DocElement
impl Sync for DocElement
impl Unpin for DocElement
impl UnsafeUnpin for DocElement
impl UnwindSafe for DocElement
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more