NotcursesBuilder

Struct NotcursesBuilder 

Source
pub struct NotcursesBuilder { /* private fields */ }
Expand description

A Notcurses builder.

Implementations§

Source§

impl NotcursesBuilder

§constructors

Source

pub fn new() -> Self

Returns a new default NotcursesBuilder, without banners.

Source

pub fn build(self) -> Result<Notcurses>

Returns a Notcurses instance.

Source§

impl NotcursesBuilder

§methods (chainable)

Source

pub fn log_level(self, log_level: LogLevel) -> Self

Sets the log level.

Source

pub fn margins(self, top: u32, right: u32, bottom: u32, left: u32) -> Self

Sets the margins.

Source

pub fn margin_top(self, top: u32) -> Self

Sets the top margin.

Source

pub fn margin_right(self, right: u32) -> Self

Sets the right margin.

Source

pub fn margin_bottom(self, bottom: u32) -> Self

Sets the bottom margin.

Source

pub fn margin_left(self, left: u32) -> Self

Sets the left margin.

Source

pub fn drain_input(self, drain: bool) -> Self

If true, Input may be freely dropped.

This ought be provided when the program does not intend to handle input. Otherwise, input can accumulate in internal buffers, eventually preventing Notcurses from processing terminal messages.

Source

pub fn inhibit_set_locale(self, inhibit: bool) -> Self

If true, wont call setlocale().

Source

pub fn no_alternate_screen(self, no_alternate: bool) -> Self

If true, wont enter alternate mode.

Source

pub fn no_clear_bitmaps(self, no_clear: bool) -> Self

If true, wont try to clear any preexisting bitmaps.

Source

pub fn no_font_changes(self, no_font_changes: bool) -> Self

If true, wont modify the font.

Source

pub fn no_quit_sig_handlers(self, no_quit: bool) -> Self

If true, wont handle SIGINT, SIGSEGV, SIGABRT nor SIGQUIT.

Source

pub fn no_winch_sig_handler(self, no_winch: bool) -> Self

If true, wont handle SIGWINCH.

Source

pub fn preserve_cursor(self, preserve: bool) -> Self

If true, will initializes the CLI plane’s virtual cursor to match the physical cursor at context creation time.

Source

pub fn scrolling(self, scrolling: bool) -> Self

If true, will prepare the CLI plane in scrolling mode.

Source

pub fn cli_mode(self, cli_mode: bool) -> Self

A shortcut for setting the following options together: no_alternate_screen, no_clear_bitmaps, preserve_cursor & scrolling.

Source

pub fn suppress_banners(self, suppress_banners: bool) -> Self

If true, wont print banners.

Trait Implementations§

Source§

impl Clone for NotcursesBuilder

Source§

fn clone(&self) -> NotcursesBuilder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NotcursesBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NotcursesBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for NotcursesBuilder

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.