Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

v0.4.0

Choose a tag to compare

@patrickomatic patrickomatic released this 06 Sep 12:21
· 34 commits to main since this release

rewrite to make invalid states impossible to represent

previously RangeOrCell had a ton of different combinations and had
some possible invalid states if you used a mix of from=RowRelative and
to=ColumnRelative or vice versa. This splits the RangeOrCell into
more distinct states where you can't mix a row or column reference.
This came with a lot of other implications and nice to haves:

  • iterators for iterating the cells or rows between a range. the rules
    are different for each type but intuitive

  • Into and AsRef implementations for efficiently converting values
    between the types. the general rules:

    • Things at the bottom (most specific) of the tree (Adress, Column
      & Row) can .into() upwards to a RangeOrCell or an A1

    • AsRef to access the underlying rows or columns without allocating.
      When possible functions take an AsRef<Column> which can be either
      a Column or Address

  • Dedicated Row and Column types which can implement Ord, Eq,
    PartialEq and lots of other useful algebraic traits

  • support for non-contiguous ranges. "A1", "A:B", "C:C" for example

  • contains() actually works (inclusively)

  • no more need for builders. with all the different new fns and from
    and into impls there isn't really a need for a builder pattern