pub struct Pager { /* private fields */ }Expand description
Keeps track of the current pager state
Implementations§
Source§impl Pager
impl Pager
Sourcepub fn with_env(env: &str) -> Self
pub fn with_env(env: &str) -> Self
Creates new instance of Pager using env environment variable instead of PAGER
Sourcepub fn with_default_pager<S>(pager: S) -> Self
pub fn with_default_pager<S>(pager: S) -> Self
Creates a new Pager instance with the specified default fallback
Sourcepub fn with_pager(pager: &str) -> Self
pub fn with_pager(pager: &str) -> Self
Creates a new Pager instance directly specifying the desired pager
Sourcepub fn pager_envs(
self,
envs: impl IntoIterator<Item = impl Into<OsString>>,
) -> Self
pub fn pager_envs( self, envs: impl IntoIterator<Item = impl Into<OsString>>, ) -> Self
Launch pager with the specified environment variables
Sourcepub fn no_skip(self) -> Self
pub fn no_skip(self) -> Self
Convert this pager to one that will not be skipped if stdout is not a TTY
Sourcepub fn skip_on_notty(&self) -> bool
pub fn skip_on_notty(&self) -> bool
Return whether this pager will be skipped if stdout is not a TTY
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 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