Struct unicode_bidi::utf16::InitialInfoExt
source · struct InitialInfoExt<'text> {
base: InitialInfo<'text>,
flags: Vec<ParagraphInfoFlags>,
}
Expand description
Extended version of InitialInfo (not public API).
Fields§
§base: InitialInfo<'text>
The base InitialInfo for the text, recording its paragraphs and bidi classes.
flags: Vec<ParagraphInfoFlags>
Parallel to base.paragraphs, records whether each paragraph is “pure LTR” that requires no further bidi processing (i.e. there are no RTL characters or bidi control codes present).
Implementations§
source§impl<'text> InitialInfoExt<'text>
impl<'text> InitialInfoExt<'text>
sourcepub fn new_with_data_source<'a, D: BidiDataSource>(
data_source: &D,
text: &'a [u16],
default_para_level: Option<Level>,
) -> InitialInfoExt<'a>
pub fn new_with_data_source<'a, D: BidiDataSource>( data_source: &D, text: &'a [u16], default_para_level: Option<Level>, ) -> InitialInfoExt<'a>
Find the paragraphs and BidiClasses in a string of text, with a custom BidiDataSource
for Bidi data. If you just wish to use the hardcoded Bidi data, please use InitialInfo::new()
instead (enabled with tbe default hardcoded-data
Cargo feature)
http://www.unicode.org/reports/tr9/#The_Paragraph_Level
Also sets the class for each First Strong Isolate initiator (FSI) to LRI or RLI if a strong character is found before the matching PDI. If no strong character is found, the class will remain FSI, and it’s up to later stages to treat these as LRI when needed.