pub struct LayoutGeometry {
pub lines: Vec<LineGeometry>,
pub dropped_lines: usize,
pub source_len: usize,
pub rendered_text: Option<String>,
pub links: Vec<LinkGeometry>,
}Expand description
Per-line, per-character geometry for one layout call.
Produced by the *_with_geometry layout methods on
crate::DocumentFlow. Every range in it indexes
rendered_text when that is Some (the markup
paths) and the caller’s source text otherwise.
Fields§
§lines: Vec<LineGeometry>One entry per emitted line, in visual top-to-bottom order.
dropped_lines: usizeHow many further lines the layout produced but did not emit,
because max_lines cut them.
source_len: usizeByte length of the text every range indexes.
rendered_text: Option<String>The text the ranges index, when it differs from the caller’s input
— i.e. on the markup paths, where the syntax has been stripped.
None on the plain-text paths, where the input is that text.
links: Vec<LinkGeometry>Hyperlinks found in the markup, against the rendered text.
Trait Implementations§
Source§impl Clone for LayoutGeometry
impl Clone for LayoutGeometry
Source§fn clone(&self) -> LayoutGeometry
fn clone(&self) -> LayoutGeometry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutGeometry
impl Debug for LayoutGeometry
Source§impl Default for LayoutGeometry
impl Default for LayoutGeometry
Source§fn default() -> LayoutGeometry
fn default() -> LayoutGeometry
Returns the “default value” for a type. Read more
Source§impl PartialEq for LayoutGeometry
impl PartialEq for LayoutGeometry
impl StructuralPartialEq for LayoutGeometry
Auto Trait Implementations§
impl Freeze for LayoutGeometry
impl RefUnwindSafe for LayoutGeometry
impl Send for LayoutGeometry
impl Sync for LayoutGeometry
impl Unpin for LayoutGeometry
impl UnsafeUnpin for LayoutGeometry
impl UnwindSafe for LayoutGeometry
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