Struct Line

Source
pub struct Line {
    pub line: Box<[Cell]>,
    pub item_line: Box<[Option<Item>]>,
    cell_to_item: Box<[i32]>,
    pub dirty_line: bool,
}

Fields§

§line: Box<[Cell]>§item_line: Box<[Option<Item>]>§cell_to_item: Box<[i32]>§dirty_line: bool

Implementations§

Source§

impl Line

Source

pub fn new(columns: usize) -> Self

Source

pub fn swap_with(&mut self, target: &mut Self, left: usize, right: usize)

Source

pub fn clear(&mut self, left: usize, right: usize, default_hl: &Rc<Highlight>)

Source

pub fn clear_glyphs(&mut self)

Source

fn set_cell_to_empty(&mut self, cell_idx: usize) -> bool

Source

fn set_cell_to_item(&mut self, new_item: &PangoItemPosition<'_>) -> bool

Source

pub fn merge(&mut self, old_items: &StyledLine, pango_items: &[Item])

Source

fn initialize_cell_item( &mut self, start_cell: usize, end_cell: usize, new_item: &Item, )

Source

pub fn get_item(&self, cell_idx: usize) -> Option<&Item>

Source

pub fn cell_to_item(&self, cell_idx: usize) -> i32

Source

pub fn item_len_from_idx(&self, start_idx: usize) -> usize

Source

pub fn is_binded_to_item(&self, cell_idx: usize) -> bool

Trait Implementations§

Source§

impl Index<usize> for Line

Source§

type Output = Cell

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Cell

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Line

Source§

fn index_mut(&mut self, index: usize) -> &mut Cell

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations§

§

impl Freeze for Line

§

impl RefUnwindSafe for Line

§

impl !Send for Line

§

impl !Sync for Line

§

impl Unpin for Line

§

impl UnwindSafe for Line

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.