Enum oma_console::pager::Pager
source · pub enum Pager {
Plain,
External((String, Child)),
}Variants§
Implementations§
source§impl Pager
impl Pager
sourcepub fn new(no_pager: bool, tips: &str) -> OmaConsoleResult<Self>
pub fn new(no_pager: bool, tips: &str) -> OmaConsoleResult<Self>
Create a new Pager (less or less-like Pager) no_pager: if false, not use less-like to see file tips: less tips
sourcepub fn pager_name(&self) -> Option<&str>
pub fn pager_name(&self) -> Option<&str>
Get pager name (like less)
sourcepub fn get_writer(&self) -> OmaConsoleResult<Box<dyn Write + '_>>
pub fn get_writer(&self) -> OmaConsoleResult<Box<dyn Write + '_>>
Get writer to writer something to pager
sourcepub fn wait_for_exit(&mut self) -> OmaConsoleResult<bool>
pub fn wait_for_exit(&mut self) -> OmaConsoleResult<bool>
Wait pager to exit
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Pager
impl Send for Pager
impl Sync for Pager
impl Unpin for Pager
impl UnwindSafe for Pager
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