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