Skip to main content

DiffOptionsBuilder

Struct DiffOptionsBuilder 

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

Fluent builder for DiffOptions.

Call .build() to validate the combination and obtain a DiffOptions.

Implementations§

Source§

impl DiffOptionsBuilder

Source

pub fn new() -> Self

Source

pub fn formula_compare(self, mode: FormulaCompareMode) -> Self

Source

pub fn format_compare(self, mode: FormatCompareMode) -> Self

Source

pub fn object_mode(self, mode: ObjectCompareMode) -> Self

Set the object comparison mode (RFC-023).

Source

pub fn execution_mode(self, mode: ExecutionMode) -> Self

Set the execution mode.

Reserved, currently has no effect — see ExecutionMode (RFC-025).

Source

pub fn include_formula_cached_values(self, yes: bool) -> Self

Source

pub fn number_compare(self, policy: NumberComparePolicy) -> Self

Source

pub fn numeric_type_policy(self, policy: NumericTypePolicy) -> Self

Source

pub fn type_mismatch_policy(self, policy: TypeMismatchPolicy) -> Self

Source

pub fn number_compare_policy(self, policy: NumberComparePolicy) -> Self

Source

pub fn sheet_matching(self, mode: SheetMatchingMode) -> Self

Source

pub fn max_sheets(self, n: u32) -> Self

Source

pub fn max_cells_compared(self, n: u64) -> Self

Source

pub fn max_diffs_returned(self, n: u64) -> Self

Source

pub fn max_alignment_product(self, limit: Option<u64>) -> Self

Bounds the m × n alignment table; Some by default (DEFAULT_MAX_ALIGNMENT_PRODUCT). Pass None to disable the bound entirely (RFC-035 §5.1 — this is opt-out, not opt-in).

Source

pub fn max_input_bytes(self, limit: Option<u64>) -> Self

Bounds input size, checked before any read begins; Some by default (DEFAULT_MAX_INPUT_BYTES). Pass None to disable the bound entirely.

Source

pub fn limits(self, limits: Limits) -> Self

Replace all limits at once, e.g. with Limits::hardened().

Source

pub fn progress<S: ProgressSink + 'static>(self, sink: S) -> Self

Source

pub fn cancellation<C: Cancellation + 'static>(self, token: C) -> Self

Source

pub fn build_with_matching( self, matching: MatchingOptions, ) -> Result<DiffOptions, SheetsDiffError>

Build with a fully specified MatchingOptions (convenience for alignment tests).

Source

pub fn build(self) -> Result<DiffOptions, SheetsDiffError>

Validate and return the built options.

Trait Implementations§

Source§

impl Default for DiffOptionsBuilder

Source§

fn default() -> DiffOptionsBuilder

Returns the “default value” for a type. Read more

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.