pub trait Source: Debug {
// Required methods
fn label(&self) -> &str;
fn sheets(&self) -> &[SheetInfo];
fn names(&self) -> &[NameInfo];
fn tables(&self) -> &[TableInfo];
fn external_books(&self) -> &[String];
fn summary(&self) -> Summary;
fn walk_sheet_with(
&self,
index: usize,
sink: &mut dyn Sink,
book_distinct: &mut HashSet<String>,
) -> Result<SheetStats, Refusal>;
// Provided methods
fn walk_sheet(
&self,
index: usize,
sink: &mut dyn Sink,
) -> Result<SheetStats, Refusal> { ... }
fn printed_name(&self, name: &NameInfo) -> String { ... }
fn header_rows(&self, sink: &mut dyn Sink) { ... }
}Expand description
A workbook opened far enough to walk, in either format: what the door,
diff, audit and --cone ask of a file. The sheet parts are read one
at a time by Source::walk_sheet and dropped.
Required Methods§
fn sheets(&self) -> &[SheetInfo]
fn names(&self) -> &[NameInfo]
fn tables(&self) -> &[TableInfo]
Sourcefn external_books(&self) -> &[String]
fn external_books(&self) -> &[String]
The other workbooks the file links to, by file name.
Sourcefn walk_sheet_with(
&self,
index: usize,
sink: &mut dyn Sink,
book_distinct: &mut HashSet<String>,
) -> Result<SheetStats, Refusal>
fn walk_sheet_with( &self, index: usize, sink: &mut dyn Sink, book_distinct: &mut HashSet<String>, ) -> Result<SheetStats, Refusal>
One sheet’s cells in document order, to the sink: a cell row for a
value the file holds, a formula row for a formula, then its
refers rows; with the workbook-wide set of distinct R1C1 formulas
carried across sheets for --counts. What the walk counted comes
back.
Provided Methods§
Sourcefn walk_sheet(
&self,
index: usize,
sink: &mut dyn Sink,
) -> Result<SheetStats, Refusal>
fn walk_sheet( &self, index: usize, sink: &mut dyn Sink, ) -> Result<SheetStats, Refusal>
Source::walk_sheet_with with no workbook-wide set.
Sourcefn printed_name(&self, name: &NameInfo) -> String
fn printed_name(&self, name: &NameInfo) -> String
A name row’s first field: the name, a sheet-scoped one behind its
sheet as a reference quotes it (Model!Local). The key diff and
audit match names by.
Sourcefn header_rows(&self, sink: &mut dyn Sink)
fn header_rows(&self, sink: &mut dyn Sink)
The rows that come before any cell, in the fixed order: every
sheet row in tab order, every name row sorted by its name without
case, every table row by its sheet’s tab order then its name.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".