[][src]Struct minus::Pager

pub struct Pager {
    pub lines: String,
    pub line_numbers: LineNumbers,
    pub prompt: String,
    // some fields omitted
}

/ A struct containing basic configurations for the pager. This is used by all initializing functions

Example

With any async runtime

 let pager = minus::Pager::new().set_text("Hello").set_prompt("Example").finish();

For static output

 let pager = minus::Pager::new().set_text("Hello").set_prompt("Example");

Fields

lines: String

The output that is displayed

line_numbers: LineNumbers

Configuration for line numbers. See LineNumbers

prompt: String

Implementations

impl Pager[src]

#[must_use]pub fn new() -> Pager[src]

Initialize a new pager configuration

pub fn set_text(self, t: impl Into<String>) -> Self[src]

Set the output text to this t

#[must_use]pub fn set_line_numbers(self, l: LineNumbers) -> Self[src]

Set line number to this setting

pub fn set_prompt(self, t: impl Into<String>) -> Self[src]

Set the prompt to t

#[must_use]pub fn finish(self) -> PagerMutex[src]

Return a PagerMutex from this Pager. This is gated on tokio_lib or async_std_lib feature

Trait Implementations

impl Clone for Pager[src]

impl Default for Pager[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.