Struct unicode_bidi::InitialInfoExt
source · pub(crate) struct InitialInfoExt<'text> {
pub(crate) base: InitialInfo<'text>,
pub(crate) 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), and whether any bidi isolation controls are 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 str,
default_para_level: Option<Level>,
) -> InitialInfoExt<'a>
pub fn new_with_data_source<'a, D: BidiDataSource>( data_source: &D, text: &'a str, 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.
Trait Implementations§
source§impl<'text> Debug for InitialInfoExt<'text>
impl<'text> Debug for InitialInfoExt<'text>
source§impl<'text> PartialEq for InitialInfoExt<'text>
impl<'text> PartialEq for InitialInfoExt<'text>
source§fn eq(&self, other: &InitialInfoExt<'text>) -> bool
fn eq(&self, other: &InitialInfoExt<'text>) -> bool
self
and other
values to be equal, and is used
by ==
.