[][src]Struct cursive::utils::lines::simple::Row

pub struct Row {
    pub start: usize,
    pub end: usize,
    pub width: usize,
    pub is_wrapped: bool,
}

Represents a row of text within a String.

A row is made of offsets into a parent String. The corresponding substring should take width cells when printed.

Fields

start: usize

Beginning of the row in the parent String.

end: usize

End of the row (excluded)

width: usize

Width of the row, in cells.

is_wrapped: bool

Whether or not this text was wrapped onto the next line

Implementations

impl Row[src]

pub fn shift(&mut self, offset: usize)[src]

Shift a row start and end by offset.

pub fn shifted(self, offset: usize) -> Row[src]

Shift a row start and end by offset.

Chainable variant;

pub fn rev_shift(&mut self, offset: usize)[src]

Shift back a row start and end by offset.

Trait Implementations

impl Clone for Row[src]

impl Copy for Row[src]

impl Debug for Row[src]

impl Eq for Row[src]

impl Hash for Row[src]

impl PartialEq<Row> for Row[src]

impl StructuralEq for Row[src]

impl StructuralPartialEq for Row[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CallHasher for T where
    T: Hash + ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> With for T[src]