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