Skip to main content

Document

Struct Document 

Source
pub struct Document { /* private fields */ }
Expand description

An OpenDocument spreadsheet opened far enough to walk.

Implementations§

Source§

impl Document

Source

pub fn open(bytes: &[u8], label: &str) -> Result<Document, Refusal>

The file read far enough to walk; label is what a refusal calls the file.

Trait Implementations§

Source§

impl Debug for Document

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Source for Document

Source§

fn label(&self) -> &str

What a refusal calls the file.
Source§

fn sheets(&self) -> &[SheetInfo]

Source§

fn names(&self) -> &[NameInfo]

Source§

fn tables(&self) -> &[TableInfo]

Source§

fn external_books(&self) -> &[String]

The other workbooks the file links to, by file name.
Source§

fn summary(&self) -> Summary

The counts --counts prints for the workbook.
Source§

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.
Source§

fn walk_sheet( &self, index: usize, sink: &mut dyn Sink, ) -> Result<SheetStats, Refusal>

Source::walk_sheet_with with no workbook-wide set.
Source§

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.
Source§

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.