pub struct BidiLevels {
pub levels: Vec<u8>,
pub paragraph_level: u8,
}Expand description
Resolved per-character embedding levels for a line of text.
Fields§
§levels: Vec<u8>One level per char in the text, in logical order.
paragraph_level: u8The paragraph embedding level: 0 for LTR, 1 for RTL.
Implementations§
Source§impl BidiLevels
impl BidiLevels
Sourcepub fn visual_order(&self) -> Vec<usize>
pub fn visual_order(&self) -> Vec<usize>
The visual order: logical indices sorted for display.
This is UAX #9 rule L2 — reverse contiguous runs of characters at or
above the lowest odd level, from the highest level down. For an
all-LTR line it is simply 0..n.
Trait Implementations§
Source§impl Clone for BidiLevels
impl Clone for BidiLevels
Source§impl Debug for BidiLevels
impl Debug for BidiLevels
impl Eq for BidiLevels
Source§impl PartialEq for BidiLevels
impl PartialEq for BidiLevels
impl StructuralPartialEq for BidiLevels
Auto Trait Implementations§
impl Freeze for BidiLevels
impl RefUnwindSafe for BidiLevels
impl Send for BidiLevels
impl Sync for BidiLevels
impl Unpin for BidiLevels
impl UnsafeUnpin for BidiLevels
impl UnwindSafe for BidiLevels
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more