pub struct TableData {
pub headers: Vec<String>,
pub rows: Vec<Vec<String>>,
pub markdown: String,
pub span: Option<Range<usize>>,
}Expand description
Plain snapshot of a rendered Markdown table, passed to the
crate::text::TextView::table_actions hook.
Fields§
§headers: Vec<String>First table row (header cells) as plain text.
rows: Vec<Vec<String>>Rows after the header as plain text cells. May be ragged while a table is still streaming in.
markdown: StringThe table serialized back to GFM pipe-table Markdown, alignments kept.
span: Option<Range<usize>>Byte range of the table in the Markdown source, for callers that need to map the table back to the document.
Not needed to keep element ids apart: the actions row is wrapped in its
own identified element, so plain ids like "copy" are already scoped
per table.
Trait Implementations§
impl StructuralPartialEq for TableData
Auto Trait Implementations§
impl Freeze for TableData
impl RefUnwindSafe for TableData
impl Send for TableData
impl Sync for TableData
impl Unpin for TableData
impl UnsafeUnpin for TableData
impl UnwindSafe for TableData
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<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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().