pub struct FlatElement<'a> {
pub document_id: &'a str,
pub revision_id: Option<&'a str>,
pub tab_id: Option<&'a str>,
pub segment: Option<SegmentRef<'a>>,
pub element: &'a DocElement,
}Expand description
One element, with the document and tab identity denormalised onto it.
The -o jsonl record. A document’s element list is a record stream,
unlike a sheet’s rows, so each line is one element rather than one line
per document. The repetition of document_id/revision_id/tab_id on
every line is the point — it is what makes a single line self-describing
to jq, which is the whole reason to reach for jsonl over json.
The element’s own fields are flattened to the top level rather than
nested under a key, so the natural filter is jq -r '.text' and every
field name matches the one -o json uses at its own depth.
Fields§
§document_id: &'a strThe document these elements came from.
revision_id: Option<&'a str>The revision they were read at, when the caller has edit access.
tab_id: Option<&'a str>The holding tab’s id, absent for a legacy single-body document.
segment: Option<SegmentRef<'a>>Which header/footer/footnote segment this element came from, absent for a body element.
element: &'a DocElementThe element itself, inlined.
Trait Implementations§
Source§impl<'a> Clone for FlatElement<'a>
impl<'a> Clone for FlatElement<'a>
Source§impl<'a> Debug for FlatElement<'a>
impl<'a> Debug for FlatElement<'a>
impl<'a> Eq for FlatElement<'a>
Source§impl<'a> PartialEq for FlatElement<'a>
impl<'a> PartialEq for FlatElement<'a>
Source§impl<'a> Serialize for FlatElement<'a>
impl<'a> Serialize for FlatElement<'a>
impl<'a> StructuralPartialEq for FlatElement<'a>
Auto Trait Implementations§
impl<'a> Freeze for FlatElement<'a>
impl<'a> RefUnwindSafe for FlatElement<'a>
impl<'a> Send for FlatElement<'a>
impl<'a> Sync for FlatElement<'a>
impl<'a> Unpin for FlatElement<'a>
impl<'a> UnsafeUnpin for FlatElement<'a>
impl<'a> UnwindSafe for FlatElement<'a>
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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> ⓘ
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> ⓘ
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