Skip to main content

minus/
dynamic_pager.rs

1use crate::Pager;
2use crate::error::MinusError;
3use crate::minus_core::init;
4
5/// Starts a asynchronously running pager
6///
7/// This means that data and configuration can be fed into the pager while it is running.
8///
9/// See [examples](../index.html#examples) on how to use this function.
10///
11/// # Panics
12/// This function will panic if another instance of minus is already running.
13///
14/// # Errors
15/// The function will return with an error if it encounters a error during paging.
16#[cfg_attr(docsrs, doc(cfg(feature = "dynamic_output")))]
17#[allow(clippy::needless_pass_by_value)]
18pub fn dynamic_paging(pager: Pager) -> Result<(), MinusError> {
19    init::init_core(&pager, crate::RunMode::Dynamic)
20}