pub trait Process {
// Required methods
fn min_height(&self) -> usize;
fn render<B: Backend>(&mut self, frame: &mut Frame<'_, B>, area: Rect);
fn process_raw_event(
&mut self,
event: Event,
) -> Result<Option<ProcessOutput>>;
// Provided methods
fn peek(&mut self) -> Result<Option<ProcessOutput>> { ... }
fn show<B, F>(
self,
terminal: &mut Terminal<B>,
area: F,
) -> Result<ProcessOutput>
where B: Backend,
F: FnMut(&Frame<'_, B>) -> Rect,
Self: Sized { ... }
}
Expand description
Trait to display a process on the shell
Required Methods§
Sourcefn min_height(&self) -> usize
fn min_height(&self) -> usize
Minimum height needed to render the process
Sourcefn render<B: Backend>(&mut self, frame: &mut Frame<'_, B>, area: Rect)
fn render<B: Backend>(&mut self, frame: &mut Frame<'_, B>, area: Rect)
Render self
in the given area from the frame
Sourcefn process_raw_event(&mut self, event: Event) -> Result<Option<ProcessOutput>>
fn process_raw_event(&mut self, event: Event) -> Result<Option<ProcessOutput>>
Provided Methods§
Sourcefn peek(&mut self) -> Result<Option<ProcessOutput>>
fn peek(&mut self) -> Result<Option<ProcessOutput>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.