pub enum LineEnd {
SoftWrap,
HardBreak {
chars: u8,
bytes: u8,
},
EndOfText,
}Expand description
How a laid-out line ends.
A screen reader distinguishes a paragraph break (which it announces and which occupies a character in the accessible text) from a soft wrap (which occupies nothing).
Variants§
SoftWrap
The line was broken to fit the wrap width. Nothing in the source separates it from the next line.
HardBreak
The line ends with an explicit break in the source.
chars is how many source characters the break occupies (1 for
\n, 2 for \r\n); bytes is how many source bytes it occupies
(likewise 1 and 2). AccessKit counts a \r\n as a single character
whose character_lengths entry is 2 — that is bytes.
EndOfText
The line ends because the source does.
Trait Implementations§
impl Copy for LineEnd
impl Eq for LineEnd
impl StructuralPartialEq for LineEnd
Auto Trait Implementations§
impl Freeze for LineEnd
impl RefUnwindSafe for LineEnd
impl Send for LineEnd
impl Sync for LineEnd
impl Unpin for LineEnd
impl UnsafeUnpin for LineEnd
impl UnwindSafe for LineEnd
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.