pub struct Pager { /* private fields */ }Expand description
Pages content through an external pager.
Implementations§
Source§impl Pager
impl Pager
Sourcepub fn command(self, command: impl Into<String>) -> Self
pub fn command(self, command: impl Into<String>) -> Self
Overrides the pager command (whitespace-split, no shell).
Sourcepub fn page(&self, content: &impl Renderable) -> Result<()>
pub fn page(&self, content: &impl Renderable) -> Result<()>
Pages content, falling back to a direct print off-terminal.
§Errors
Returns SparcliError::Io if spawning the pager or writing fails,
or SparcliError::Config if the pager command is empty.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pager
impl RefUnwindSafe for Pager
impl Send for Pager
impl Sync for Pager
impl Unpin for Pager
impl UnsafeUnpin 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