pub trait InquireLength {
    fn inquire_length(&self) -> usize;
}
Expand description

Custom trait to call correct method to retrieve input length.

The method can vary depending on the type of input.

String inputs should count the number of graphemes, via .graphemes(true).count(), instead of the number of bytes via .len(). While simple slices should keep using .len()

Required Methods

String inputs should count the number of graphemes, via .graphemes(true).count(), instead of the number of bytes via .len(). While simple slices keep using .len()

Implementations on Foreign Types

Implementors