pub fn canonical_string(&self) -> String {
        let mut string = String::with_capacity(100);

        // Write out the coursing order as a string of bells
        string.push_str("CO: <");

        for b in self.order.iter().skip(1) {
            string.push(b.as_char());
        }

        string.push_str("> ");

        let run_sections = self.get_run_sections();

        // Add "no runs." or "runs:" depending on if this will be followed by some run segments
        if run_sections.is_empty() {
            string.push_str("no runs.");
        } else {
            string.push_str("runs:");
        }

        // Add the run sections to the string
        for r in run_sections {
            let a = r.bell_start.as_usize();
            let b = r.bell_end.as_usize();

            string.push_str(" ");

            if b > a {
                for i in a..=b {
                    string.push(Bell::from(i).as_char());
                }
            } else {
                for i in (b..=a).rev() {
                    string.push(Bell::from(i).as_char());
                }
            }

            string.push('s');

            string.push_str(if r.stroke == Stroke::Hand {
                "(H)"
            } else {
                "(B)"
            });
        }

        // Detect if the tenors are hunting the 'wrong' way round, and will generate e.g. 87s
        let tenor_number = self[0].as_usize();

        if self[self.order.len() as isize - 1].as_usize() == tenor_number - 1 {
            string.push(' ');
            string.push(Bell::from(tenor_number).as_char());
            string.push(Bell::from(tenor_number - 1).as_char());
            string.push('s');
        }

        string
    }
/// Returns a [String] with a summary of this `CoursingOrder`, containing:
/// - the [RunSection]s contained in this course and what stroke those runs are on.
/// - 87s or 09s or TEs at backstroke.
///
/// # Example
/// ```
/// use bellmetal::{CoursingOrder};
///
/// assert_eq!(
///     CoursingOrder::from("097356428").canonical_string(),
///     "CO: <97356428> runs: 23456s(H) 7890s(B)"
/// );
///
/// assert_eq!(
///     CoursingOrder::from("8542367").canonical_string(),
///     "CO: <542367> no runs. 87s"
/// );
/// ```
Returns a [String] with a summary of this `CoursingOrder`, containing:
the [RunSection]s contained in this course and what stroke those runs are on.
87s or 09s or TEs at backstroke.
Returns a [ String ] with a summary of this ` CoursingOrder ` containing : the [ RunSection ] s contained in this course and what stroke those runs are on . 87s or 09s or TEs at backstroke .
pub fn canonical_string(&self) -> String {
        let mut string = String::with_capacity(100);
        // Write out the coursing order as a string of bells
        string.push_str("CO: <");
        for b in self.order.iter().skip(1) {
            string.push(b.as_char());
        }
        string.push_str("> ");
        let run_sections = self.get_run_sections();
        // Add "no runs." or "runs:" depending on if this will be followed by some run segments
        if run_sections.is_empty() {
            string.push_str("no runs.");
        } else {
            string.push_str("runs:");
        }
        // Add the run sections to the string
        for r in run_sections {
            let a = r.bell_start.as_usize();
            let b = r.bell_end.as_usize();
            string.push_str(" ");
            if b > a {
                for i in a..=b {
                    string.push(Bell::from(i).as_char());
                }
            } else {
                for i in (b..=a).rev() {
                    string.push(Bell::from(i).as_char());
                }
            }
            string.push('s');
            string.push_str(if r.stroke == Stroke::Hand {
                "(H)"
            } else {
                "(B)"
            });
        }
        // Detect if the tenors are hunting the 'wrong' way round, and will generate e.g. 87s
        let tenor_number = self[0].as_usize();
        if self[self.order.len() as isize - 1].as_usize() == tenor_number - 1 {
            string.push(' ');
            string.push(Bell::from(tenor_number).as_char());
            string.push(Bell::from(tenor_number - 1).as_char());
            string.push('s');
        }
        string
    }
pub fn canonical_string ( & self ) -> String { let mut string = String :: with_capacity ( 100 ) ; // Write out the coursing order as a string of bells string . push_str ( " " ) ; for b in self . order . iter ( ) . skip ( 1 ) { string . push ( b . as_char ( ) ) ; } string . push_str ( " " ) ; let run_sections = self . get_run_sections ( ) ; // Add "no runs." or "runs:" depending on if this will be followed by some run segments if run_sections . is_empty ( ) { string . push_str ( " " ) ; } else { string . push_str ( " " ) ; } // Add the run sections to the string for r in run_sections { let a = r . bell_start . as_usize ( ) ; let b = r . bell_end . as_usize ( ) ; string . push_str ( " " ) ; if b > a { for i in a ..= b { string . push ( Bell :: from ( i ) . as_char ( ) ) ; } } else { for i in ( b ..= a ) . rev ( ) { string . push ( Bell :: from ( i ) . as_char ( ) ) ; } } string . push ( 's' ) ; string . push_str ( if r . stroke == Stroke :: Hand { " " } else { " " } ) ; } // Detect if the tenors are hunting the 'wrong' way round, and will generate e.g. 87s let tenor_number = self [ 0 ] . as_usize ( ) ; if self [ self . order . len ( ) as isize - 1 ] . as_usize ( ) == tenor_number - 1 { string . push ( ' ' ) ; string . push ( Bell :: from ( tenor_number ) . as_char ( ) ) ; string . push ( Bell :: from ( tenor_number - 1 ) . as_char ( ) ) ; string . push ( 's' ) ; } string }
Returns a [String] with a summary of this `CoursingOrder`, containing:
 the [RunSection]s contained in this course and what stroke those runs are on.
Returns a [ String ] with a summary of this ` CoursingOrder ` containing : the [ RunSection ] s contained in this course and what stroke those runs are on .
&self
&self
example
```
use bellmetal::{CoursingOrder}.




` ` ` use bellmetal :: { CoursingOrder } .