ArabicReshaperExt

Trait ArabicReshaperExt 

Source
pub trait ArabicReshaperExt: Iterator + Sized
where Self::Item: AsRef<str>,
{ // Provided methods fn reshape_default(self) -> ArabicReshaperIter<Self> { ... } fn reshape_with_config( self, config: ReshaperConfig, ) -> ArabicReshaperIter<Self> { ... } }
Expand description

Wrap an iterator to reshape strings

Provided Methods§

Source

fn reshape_default(self) -> ArabicReshaperIter<Self>

Reshape the iterator with the default ArabicReshaper config

Examples found in repository?
examples/reshape_iterator.rs (line 11)
3fn main() {
4    let lines = [
5        "به نام خدا",
6        "همه چی درست میشه!",
7        "راست خیلی قشنگه ها",
8        "ازش خوشم میاد",
9    ];
10
11    for line in lines.iter().reshape_default() {
12        println!("{line}");
13    }
14}
Source

fn reshape_with_config(self, config: ReshaperConfig) -> ArabicReshaperIter<Self>

Reshape the iterator using the given config

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<I: Iterator> ArabicReshaperExt for I
where I::Item: AsRef<str>,