Struct streampager::pager::Pager[][src]

pub struct Pager { /* fields omitted */ }

The main pager state.

Implementations

impl Pager[src]

pub fn new_using_system_terminal() -> Result<Self>[src]

Build a Pager using the system terminal.

pub fn new_using_stdio() -> Result<Self>[src]

Build a Pager using the system stdio.

pub fn new_with_input_output(
    input: &impl AsRawFd,
    output: &impl AsRawFd
) -> Result<Self>
[src]

Build a Pager using the specified terminal input and output.

pub fn add_stream(
    &mut self,
    stream: impl Read + Send + 'static,
    title: &str
) -> Result<FileIndex>
[src]

Add a stream to be paged.

pub fn add_error_stream(
    &mut self,
    stream: impl Read + Send + 'static,
    title: &str
) -> Result<FileIndex>
[src]

Attach an error stream to the previously added output stream.

pub fn add_file(&mut self, filename: &OsStr) -> Result<FileIndex>[src]

Attach a file from disk.

pub fn add_controlled_file(
    &mut self,
    controller: &Controller
) -> Result<FileIndex>
[src]

Attach a controlled file.

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>, 
[src]

Attach the output and error streams from a subprocess.

Returns the file index for each stream.

pub fn set_progress_stream(&mut self, stream: impl Read + Send + 'static)[src]

Set the progress stream.

pub fn set_interface_mode(&mut self, value: impl Into<InterfaceMode>)[src]

Set when to use full screen mode. See InterfaceMode for details.

pub fn set_scroll_past_eof(&mut self, value: bool)[src]

Set whether scrolling can past end of file.

pub fn set_read_ahead_lines(&mut self, lines: usize)[src]

Set how many lines to read ahead.

pub fn set_wrapping_mode(&mut self, value: impl Into<WrappingMode>)[src]

Set default wrapping mode. See WrappingMode for details.

pub fn set_keymap_name(&mut self, keymap: impl Into<String>)[src]

Set keymap name.

pub fn set_keymap(&mut self, keymap: Keymap)[src]

Set keymap.

pub fn action_sender(&self) -> ActionSender[src]

Create an action sender which can be used to send Actions to this pager.

pub fn run(self) -> Result<()>[src]

Run Stream Pager.

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,