Trait icu_segmenter::line::LineBreakType

source ·
pub trait LineBreakType<'l, 's> {
    type IterAttr: Iterator<Item = (usize, Self::CharType)> + Clone;
    type CharType: Copy + Into<u32>;

    // Required methods
    fn use_complex_breaking(
        iterator: &LineBreakIterator<'l, 's, Self>,
        c: Self::CharType,
    ) -> bool;
    fn get_linebreak_property_with_rule(
        iterator: &LineBreakIterator<'l, 's, Self>,
        c: Self::CharType,
    ) -> u8;
    fn get_current_position_character_len(
        iterator: &LineBreakIterator<'l, 's, Self>,
    ) -> usize;
    fn handle_complex_language(
        iterator: &mut LineBreakIterator<'l, 's, Self>,
        left_codepoint: Self::CharType,
    ) -> Option<usize>;
}
Expand description

A trait allowing for LineBreakIterator to be generalized to multiple string iteration methods.

This is implemented by ICU4X for several common string types.

Required Associated Types§

source

type IterAttr: Iterator<Item = (usize, Self::CharType)> + Clone

The iterator over characters.

source

type CharType: Copy + Into<u32>

The character type.

Required Methods§

source

fn use_complex_breaking( iterator: &LineBreakIterator<'l, 's, Self>, c: Self::CharType, ) -> bool

source

fn get_linebreak_property_with_rule( iterator: &LineBreakIterator<'l, 's, Self>, c: Self::CharType, ) -> u8

source

fn get_current_position_character_len( iterator: &LineBreakIterator<'l, 's, Self>, ) -> usize

source

fn handle_complex_language( iterator: &mut LineBreakIterator<'l, 's, Self>, left_codepoint: Self::CharType, ) -> Option<usize>

Object Safety§

This trait is not object safe.

Implementors§