[−][src]Struct meli::terminal::embed::grid::EmbedGrid
EmbedGrid
manages the terminal grid state of the embed process.
The embed process sends bytes to the master end (see super mod) and interprets them in a state
machine stored in State
. Escape codes are translated as changes to the grid, eg changes in a
cell's colors.
The main process copies the grid whenever the actual terminal is redrawn.
Fields
cursor: (usize, usize)
scroll_region: ScrollRegion
[top;bottom]
grid: CellBuffer
state: State
stdin: File
child_pid: Pid
Pid of the embed process
terminal_size: (usize, usize)
(width, height)
fg_color: Color
bg_color: Color
prev_fg_color: Option<Color>
Store the fg/bg color when highlighting the cell where the cursor is so that it can be restored afterwards
prev_bg_color: Option<Color>
show_cursor: bool
origin_mode: bool
auto_wrap_mode: bool
wrap_next: bool
If next grapheme should be placed in the next line This should be reset whenever the cursor value changes
codepoints: CodepointBuf
Store state in case a multi-byte character is encountered
Implementations
impl EmbedGrid
[src]
pub fn new(stdin: File, child_pid: Pid) -> Self
[src]
pub fn set_terminal_size(&mut self, new_val: (usize, usize))
[src]
pub fn wake_up(&self)
[src]
pub fn stop(&self)
[src]
pub fn is_active(&self) -> Result<WaitStatus>
[src]
pub fn process_byte(&mut self, byte: u8)
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for EmbedGrid
impl Send for EmbedGrid
impl Sync for EmbedGrid
impl Unpin for EmbedGrid
impl UnwindSafe for EmbedGrid
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,