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
pub fn env(env: &str) -> Self
👎Deprecated since 0.12.0: use with_env() instead
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 skip_on_notty(self) -> Self
👎Deprecated since 0.14.0: ‘skip_on_notty’ is default now
pub fn skip_on_notty(self) -> Self
Instructs Pager
to bypass invoking pager if output 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