Repeat

Trait Repeat 

Source
pub trait Repeat<const SIZE: usize, const PAD1: usize, const PAD2: usize, HEAP> {
    // Required method
    fn repeat_n(&self, n: usize) -> FlexStr<SIZE, PAD1, PAD2, HEAP>;
}
Expand description

Trait that can repeat a given FlexStr “n” times efficiently

Required Methods§

Source

fn repeat_n(&self, n: usize) -> FlexStr<SIZE, PAD1, PAD2, HEAP>

Repeats a given string “n” times efficiently and returns a new FlexStr

Implementations on Foreign Types§

Source§

impl<const SIZE: usize, const PAD1: usize, const PAD2: usize, HEAP> Repeat<SIZE, PAD1, PAD2, HEAP> for str
where HEAP: for<'a> From<&'a str>,

Source§

fn repeat_n(&self, n: usize) -> FlexStr<SIZE, PAD1, PAD2, HEAP>

Implementors§

Source§

impl<const SIZE: usize, const PAD1: usize, const PAD2: usize, HEAP> Repeat<SIZE, PAD1, PAD2, HEAP> for FlexStr<SIZE, PAD1, PAD2, HEAP>
where HEAP: Deref<Target = str> + for<'a> From<&'a str>,