pub struct Screen { /* private fields */ }Expand description
A Screen contains multiple windows. When initiated, a Screen only contains one window with
id = 0.
Implementations§
Source§impl Screen
impl Screen
Sourcepub fn name_screen(name: &str) -> Screen
pub fn name_screen(name: &str) -> Screen
Create a new Screen with name
Sourcepub fn set_window_name(
&mut self,
id: usize,
name: &str,
) -> Result<(), ErrorKind>
pub fn set_window_name( &mut self, id: usize, name: &str, ) -> Result<(), ErrorKind>
Set name to window
Sourcepub fn append_left_child(&mut self, id: usize) -> Result<usize, ErrorKind>
pub fn append_left_child(&mut self, id: usize) -> Result<usize, ErrorKind>
Splits window with id into a left and right window. If successfull, the left window keeps the id you
passed, and the function returns Ok(id), with the id of the right window. If failed, returns
Err(std::io::ErrorKind).
Sourcepub fn append_down_child(&mut self, id: usize) -> Result<usize, ErrorKind>
pub fn append_down_child(&mut self, id: usize) -> Result<usize, ErrorKind>
Splits window with id into an up and down window. If successfull, the up window keeps the id you
passed, and the function returns Ok(id), with the id of the down window. If failed, returns
Err(std::io::ErrorKind).
Sourcepub fn println(&mut self, id: usize, line: &str) -> Result<(), ErrorKind>
pub fn println(&mut self, id: usize, line: &str) -> Result<(), ErrorKind>
Print a new line in window with id. Returns () if successful, Err(std::io::ErrorKind) if not.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Screen
impl RefUnwindSafe for Screen
impl Send for Screen
impl Sync for Screen
impl Unpin for Screen
impl UnwindSafe for Screen
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more