pub(crate) fn compute_initial_info<'a, D: BidiDataSource, T: TextSource<'a> + ?Sized>(
    data_source: &D,
    text: &'a T,
    default_para_level: Option<Level>,
    split_paragraphs: Option<(&mut Vec<ParagraphInfo>, &mut Vec<bool>)>
) -> (Vec<BidiClass>, Level, bool)
Expand description

Implementation of initial-info computation for both BidiInfo and ParagraphBidiInfo. To treat the text as (potentially) multiple paragraphs, the caller should pass the pair of optional outparam arrays to receive the ParagraphInfo and pure-ltr flags for each paragraph. Passing None for split_paragraphs will ignore any paragraph- separator characters in the text, treating it just as a single paragraph. Returns the array of BidiClass values for each code unit of the text, along with the embedding level and pure-ltr flag for the last (or only) paragraph.