[−][src]Struct minus::Pager
/ 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
Auto Trait Implementations
impl RefUnwindSafe for Pager
[src]
impl Send for Pager
[src]
impl Sync for Pager
[src]
impl Unpin for Pager
[src]
impl UnwindSafe for Pager
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,