1pub mod address;
31mod align;
32mod diff;
33mod error;
34mod matcher;
35mod meta;
36mod normalize;
37mod open;
38
39pub mod compare;
40
41pub mod model;
47
48pub mod options;
50
51pub mod output;
53
54pub use error::{LimitKind, OpenErrorKind, ReadErrorKind, SheetsDiffError};
60
61pub use model::{
63 AlignmentSummary,
64 CellChangeKind,
65 CellDateTime,
66 CellDiff,
67 CellDuration,
68 CellError,
69 CellValue,
70 DateTimeKind,
71 DiagnosticKind,
72 DiagnosticLocation,
73 DiagnosticSummary,
74 Diagnostic,
75 DiffStage,
76 DiffSummary,
77 FormatChange,
78 FormulaChange,
79 FormulaText,
80 MatchConfidence,
81 Severity,
82 SheetChange,
83 SheetDiff,
84 SheetMatchReason,
85 SheetRef,
86 SheetSummary,
87 Side,
88 SourceDescription,
89 SourceKind,
90 ValueChange,
91 ValueDifferenceKind,
92 WorkbookChange,
93 WorkbookDiff,
94 WorkbookObjectChange,
95 WorkbookSideInfo,
96};
97
98pub use address::{CellAddress, ComparedRange, MAX_COL, MAX_COL_LABEL, MAX_ROW};
100
101pub use options::{
103 AlignmentMode,
104 Cancellation,
105 ComparisonOptions,
106 DateComparePolicy,
107 DiagnosticOptions,
108 DiffEvent,
109 DiffOptions,
110 DiffOptionsBuilder,
111 ExecutionMode,
112 ExecutionOptions,
113 FormatCompareMode,
114 FormulaCompareMode,
115 Limits,
116 MatchingOptions,
117 NumberComparePolicy,
118 NumericTypePolicy,
119 OutputOptions,
120 ProgressSink,
121 SheetMatchingMode,
122 TypeMismatchPolicy,
123 ValueCompareOptions,
124};
125
126use std::io::{Read, Seek};
131use std::path::Path;
132
133pub fn compare_paths(
137 old: impl AsRef<Path>,
138 new: impl AsRef<Path>,
139) -> Result<WorkbookDiff, SheetsDiffError> {
140 diff::run_compare_paths(old, new, DiffOptions::default())
141}
142
143pub fn compare_paths_with_options(
145 old: impl AsRef<Path>,
146 new: impl AsRef<Path>,
147 opts: DiffOptions,
148) -> Result<WorkbookDiff, SheetsDiffError> {
149 diff::run_compare_paths(old, new, opts)
150}
151
152pub fn compare_bytes(
154 old: impl AsRef<[u8]>,
155 new: impl AsRef<[u8]>,
156) -> Result<WorkbookDiff, SheetsDiffError> {
157 diff::run_compare_bytes(old, new, DiffOptions::default())
158}
159
160pub fn compare_bytes_with_options(
162 old: impl AsRef<[u8]>,
163 new: impl AsRef<[u8]>,
164 opts: DiffOptions,
165) -> Result<WorkbookDiff, SheetsDiffError> {
166 diff::run_compare_bytes(old, new, opts)
167}
168
169pub fn compare_readers<R1, R2>(
173 old: R1,
174 new: R2,
175) -> Result<WorkbookDiff, SheetsDiffError>
176where
177 R1: Read + Seek,
178 R2: Read + Seek,
179{
180 diff::run_compare_readers(old, new, DiffOptions::default())
181}
182
183pub fn compare_readers_with_options<R1, R2>(
185 old: R1,
186 new: R2,
187 opts: DiffOptions,
188) -> Result<WorkbookDiff, SheetsDiffError>
189where
190 R1: Read + Seek,
191 R2: Read + Seek,
192{
193 diff::run_compare_readers(old, new, opts)
194}