Crate bellframe

source ·
Expand description

Idiomatic Rust representations of commonly used primitives for Change Ringing compositions.

Re-exports§

Modules§

Structs§

  • A type-safe representation of a ‘bell’, which adds things like conversions to and from commonly-used bell names. Each Bell takes a single byte in memory.
  • An error created when a Row was used to permute something with the wrong length
  • A newtype over u8 that represents a stage. All Stages must contain at least one Bell; zero-bell Stages cannot be created without using incorrect unsafe code.

Enums§

  • Data type representing the parity of a Row. To generate these, you probably want to use Row::parity. Note that Row::parity always performs a heap allocation and is linear-time in the Stage of the Row. If you are using Paritys as optimisations within hot code I would recommend computing them upfront on your input Rows and then tracking them by hand, probably using the * operator.
  • Stroke of a row, i.e. handstroke (Stroke::Hand) or backstroke (Stroke::Back).
  • A set of at least one Stroke
  • Whether Rows are repeated in some section of ringing.

Functions§

  • Helper function to calculate the length of the longest run off the start of a given Iterator