Struct tty_interface::layout::SegmentLayout
source · [−]pub struct SegmentLayout { /* private fields */ }Expand description
A rendered segment’s layout once arranged on the screen.
Implementations
sourceimpl SegmentLayout
impl SegmentLayout
sourcepub fn segment_id(&self) -> Option<SegmentId>
pub fn segment_id(&self) -> Option<SegmentId>
This layout’s segment identifier.
sourcepub fn parts(&self) -> &Vec<PartLayout>
pub fn parts(&self) -> &Vec<PartLayout>
This layout’s constituent parts.
sourcepub fn wrapped_line_count(&self) -> u16
pub fn wrapped_line_count(&self) -> u16
The total number of rendered terminal lines in this layout, after wrapping.
sourcepub fn end_position(&self) -> Option<AbsolutePosition>
pub fn end_position(&self) -> Option<AbsolutePosition>
The exclusive position on screen where this segment ends.
sourcepub fn get_absolute_position(
&self,
grapheme_index: usize
) -> Option<AbsolutePosition>
pub fn get_absolute_position(
&self,
grapheme_index: usize
) -> Option<AbsolutePosition>
Computes the absolute position of the specified grapheme.
Trait Implementations
sourceimpl Clone for SegmentLayout
impl Clone for SegmentLayout
sourcefn clone(&self) -> SegmentLayout
fn clone(&self) -> SegmentLayout
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for SegmentLayout
impl Send for SegmentLayout
impl Sync for SegmentLayout
impl Unpin for SegmentLayout
impl UnwindSafe for SegmentLayout
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more