pub struct CoolInput<H: CustomInput> {
pub text: String,
pub cursor_x: usize,
pub cursor_y: usize,
pub scroll_y: usize,
pub listening: bool,
pub custom_input: H,
pub tab_width: usize,
}
Fields§
§text: String
§cursor_x: usize
§cursor_y: usize
§scroll_y: usize
§listening: bool
§custom_input: H
§tab_width: usize
Implementations§
Source§impl<H: CustomInput> CoolInput<H>
impl<H: CustomInput> CoolInput<H>
pub fn new(handler: H, tab_width: usize) -> Self
pub fn render(&mut self) -> Result<(), Error>
pub fn get_terminal_size(&mut self) -> Result<(u16, u16), Error>
pub fn handle_key_press(&mut self, key: Event) -> Result<(), Error>
pub fn listen_quiet(&mut self) -> Result<(), Error>
pub fn pre_listen(&mut self) -> Result<(), Error>
pub fn post_listen(&mut self) -> Result<(), Error>
pub fn listen(&mut self) -> Result<(), Error>
Auto Trait Implementations§
impl<H> Freeze for CoolInput<H>where
H: Freeze,
impl<H> RefUnwindSafe for CoolInput<H>where
H: RefUnwindSafe,
impl<H> Send for CoolInput<H>where
H: Send,
impl<H> Sync for CoolInput<H>where
H: Sync,
impl<H> Unpin for CoolInput<H>where
H: Unpin,
impl<H> UnwindSafe for CoolInput<H>where
H: UnwindSafe,
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