pub struct LineBox {
pub y: u32,
pub height: u32,
pub range: Range<usize>,
pub source: LineSource,
pub x: u32,
pub width: u32,
}Expand description
One visual line within a message.
Fields§
§y: u32Y offset from the top of the message.
height: u32§range: Range<usize>Byte range within the owning source’s text.
source: LineSourceWhere this line’s text comes from.
x: u32X offset — the indent column, or 0 for full-width content.
width: u32Measured width of the line’s text, in px.
Recorded here rather than re-measured by the view because the wrap pass already knows it — it is the number the break decision was made on. Anything that wants to draw a box around laid-out text (a fenced code block, today) gets the same extent the wrapper used, so the box cannot disagree with the wrap.
Trait Implementations§
impl Eq for LineBox
impl StructuralPartialEq for LineBox
Auto Trait Implementations§
impl Freeze for LineBox
impl RefUnwindSafe for LineBox
impl Send for LineBox
impl Sync for LineBox
impl Unpin for LineBox
impl UnsafeUnpin for LineBox
impl UnwindSafe for LineBox
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