1 pub trait Enter { 2 /// 调用键盘输入回调 3 fn emit_enter(&self, char: char, redraw: &mut bool); 4 /// 设置回调函数 5 fn set_enter_callback<T: Fn(&Self, char, &mut bool) + 'static>(&self, func: T); 6 } 7