pub mod address;
mod diff;
mod error;
mod matcher;
mod normalize;
mod open;
pub mod compare;
pub mod model;
pub mod options;
pub mod output;
pub use error::{LimitKind, OpenErrorKind, ReadErrorKind, SheetsDiffError};
pub use model::{
AlignmentSummary,
CellChangeKind,
CellDateTime,
CellDiff,
CellDuration,
CellError,
CellValue,
DateTimeKind,
DiagnosticKind,
DiagnosticLocation,
DiagnosticSummary,
Diagnostic,
DiffStage,
DiffSummary,
FormatChange,
FormulaChange,
FormulaText,
MatchConfidence,
Severity,
SheetChange,
SheetDiff,
SheetMatchReason,
SheetRef,
SheetSummary,
Side,
SourceDescription,
SourceKind,
ValueChange,
ValueDifferenceKind,
WorkbookChange,
WorkbookDiff,
WorkbookObjectChange,
WorkbookSideInfo,
};
pub use address::{CellAddress, ComparedRange, MAX_COL, MAX_COL_LABEL, MAX_ROW};
pub use options::{
AlignmentMode,
Cancellation,
ComparisonOptions,
DateComparePolicy,
DiagnosticOptions,
DiffEvent,
DiffOptions,
DiffOptionsBuilder,
ExecutionMode,
ExecutionOptions,
FormulaCompareMode,
Limits,
MatchingOptions,
NumberComparePolicy,
NumericTypePolicy,
OutputOptions,
ProgressSink,
SheetMatchingMode,
TypeMismatchPolicy,
ValueCompareOptions,
};
use std::io::{Read, Seek};
use std::path::Path;
pub fn compare_paths(
old: impl AsRef<Path>,
new: impl AsRef<Path>,
) -> Result<WorkbookDiff, SheetsDiffError> {
diff::run_compare_paths(old, new, DiffOptions::default())
}
pub fn compare_paths_with_options(
old: impl AsRef<Path>,
new: impl AsRef<Path>,
opts: DiffOptions,
) -> Result<WorkbookDiff, SheetsDiffError> {
diff::run_compare_paths(old, new, opts)
}
pub fn compare_bytes(
old: impl AsRef<[u8]>,
new: impl AsRef<[u8]>,
) -> Result<WorkbookDiff, SheetsDiffError> {
diff::run_compare_bytes(old, new, DiffOptions::default())
}
pub fn compare_bytes_with_options(
old: impl AsRef<[u8]>,
new: impl AsRef<[u8]>,
opts: DiffOptions,
) -> Result<WorkbookDiff, SheetsDiffError> {
diff::run_compare_bytes(old, new, opts)
}
pub fn compare_readers<R1, R2>(
old: R1,
new: R2,
) -> Result<WorkbookDiff, SheetsDiffError>
where
R1: Read + Seek,
R2: Read + Seek,
{
diff::run_compare_readers(old, new, DiffOptions::default())
}
pub fn compare_readers_with_options<R1, R2>(
old: R1,
new: R2,
opts: DiffOptions,
) -> Result<WorkbookDiff, SheetsDiffError>
where
R1: Read + Seek,
R2: Read + Seek,
{
diff::run_compare_readers(old, new, opts)
}