Struct streampager::pager::Pager
source · [−]pub struct Pager { /* private fields */ }
Expand description
The main pager state.
Implementations
sourceimpl Pager
impl Pager
sourcepub fn new_using_system_terminal() -> Result<Self>
pub fn new_using_system_terminal() -> Result<Self>
Build a Pager
using the system terminal.
sourcepub fn new_using_stdio() -> Result<Self>
pub fn new_using_stdio() -> Result<Self>
Build a Pager
using the system stdio.
sourcepub fn new_with_input_output(
input: &impl AsRawFd,
output: &impl AsRawFd
) -> Result<Self>
pub fn new_with_input_output(
input: &impl AsRawFd,
output: &impl AsRawFd
) -> Result<Self>
Build a Pager
using the specified terminal input and output.
sourcepub fn add_stream(
&mut self,
stream: impl Read + Send + 'static,
title: &str
) -> Result<FileIndex>
pub fn add_stream(
&mut self,
stream: impl Read + Send + 'static,
title: &str
) -> Result<FileIndex>
Add a stream to be paged.
sourcepub fn add_error_stream(
&mut self,
stream: impl Read + Send + 'static,
title: &str
) -> Result<FileIndex>
pub fn add_error_stream(
&mut self,
stream: impl Read + Send + 'static,
title: &str
) -> Result<FileIndex>
Attach an error stream to the previously added output stream.
sourcepub fn add_controlled_file(
&mut self,
controller: &Controller
) -> Result<FileIndex>
pub fn add_controlled_file(
&mut self,
controller: &Controller
) -> Result<FileIndex>
Attach a controlled file.
sourcepub fn add_subprocess<I, S>(
&mut self,
command: &OsStr,
args: I,
title: &str
) -> Result<(FileIndex, FileIndex)>where
I: IntoIterator<Item = S>,
S: AsRef<OsStr>,
pub fn add_subprocess<I, S>(
&mut self,
command: &OsStr,
args: I,
title: &str
) -> Result<(FileIndex, FileIndex)>where
I: IntoIterator<Item = S>,
S: AsRef<OsStr>,
Attach the output and error streams from a subprocess.
Returns the file index for each stream.
sourcepub fn set_progress_stream(&mut self, stream: impl Read + Send + 'static)
pub fn set_progress_stream(&mut self, stream: impl Read + Send + 'static)
Set the progress stream.
sourcepub fn set_interface_mode(&mut self, value: impl Into<InterfaceMode>)
pub fn set_interface_mode(&mut self, value: impl Into<InterfaceMode>)
Set when to use full screen mode. See InterfaceMode
for details.
sourcepub fn set_scroll_past_eof(&mut self, value: bool)
pub fn set_scroll_past_eof(&mut self, value: bool)
Set whether scrolling can past end of file.
sourcepub fn set_read_ahead_lines(&mut self, lines: usize)
pub fn set_read_ahead_lines(&mut self, lines: usize)
Set how many lines to read ahead.
sourcepub fn set_startup_poll_input(&mut self, poll_input: bool)
pub fn set_startup_poll_input(&mut self, poll_input: bool)
Set whether to poll input during start-up (delayed or direct mode).
sourcepub fn set_show_ruler(&mut self, show_ruler: bool)
pub fn set_show_ruler(&mut self, show_ruler: bool)
Set whether to show the ruler by default.
sourcepub fn set_wrapping_mode(&mut self, value: impl Into<WrappingMode>)
pub fn set_wrapping_mode(&mut self, value: impl Into<WrappingMode>)
Set default wrapping mode. See WrappingMode
for details.
sourcepub fn set_keymap_name(&mut self, keymap: impl Into<String>)
pub fn set_keymap_name(&mut self, keymap: impl Into<String>)
Set keymap name.
sourcepub fn set_keymap(&mut self, keymap: Keymap)
pub fn set_keymap(&mut self, keymap: Keymap)
Set keymap.
sourcepub fn action_sender(&self) -> ActionSender
pub fn action_sender(&self) -> ActionSender
Create an action sender which can be used to send Action
s to this pager.