Struct tty_interface::layout::PartLayout
source · [−]pub struct PartLayout { /* private fields */ }Expand description
A part of a segment’s layout once arranged on the screen.
Implementations
sourceimpl PartLayout
impl PartLayout
sourcepub fn position(&self) -> AbsolutePosition
pub fn position(&self) -> AbsolutePosition
The position on screen where this part of the segment begins.
sourcepub fn start(&self) -> usize
pub fn start(&self) -> usize
The inclusive start index of the segment text substring included in this part of the layout.
sourcepub fn end(&self) -> usize
pub fn end(&self) -> usize
The exclusive end index of the segment text substring included in this part of the layout.
sourcepub fn widths(&self) -> &Vec<usize>
pub fn widths(&self) -> &Vec<usize>
The grapheme cluster widths for this part of the layout. There should be length widths.
sourcepub fn end_position(&self) -> AbsolutePosition
pub fn end_position(&self) -> AbsolutePosition
The exclusive position on screen where this part of the segment ends.
sourcepub fn get_position(&self, index: usize) -> Option<AbsolutePosition>
pub fn get_position(&self, index: usize) -> Option<AbsolutePosition>
Compute the position of a specific index in this layout.
Trait Implementations
sourceimpl Clone for PartLayout
impl Clone for PartLayout
sourcefn clone(&self) -> PartLayout
fn clone(&self) -> PartLayout
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
sourceimpl Debug for PartLayout
impl Debug for PartLayout
sourceimpl PartialEq<PartLayout> for PartLayout
impl PartialEq<PartLayout> for PartLayout
sourcefn eq(&self, other: &PartLayout) -> bool
fn eq(&self, other: &PartLayout) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &PartLayout) -> bool
fn ne(&self, other: &PartLayout) -> bool
This method tests for !=.
impl Eq for PartLayout
impl StructuralEq for PartLayout
impl StructuralPartialEq for PartLayout
Auto Trait Implementations
impl RefUnwindSafe for PartLayout
impl Send for PartLayout
impl Sync for PartLayout
impl Unpin for PartLayout
impl UnwindSafe for PartLayout
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