Struct bard::app::App

source ·
pub struct App { /* private fields */ }
Expand description

Runtime config and stdio output fns.

Implementations§

source§

impl App

source

pub fn new(opts: &MakeOpts, interrupt: InterruptFlag) -> Self

source

pub fn with_test_mode( post_process: bool, bard_exe: PathBuf, interrupt: InterruptFlag ) -> Self

source

pub fn post_process(&self) -> bool

source

pub fn keep_interm(&self) -> u8

source

pub fn verbosity(&self) -> u8

source

pub fn use_color(&self) -> bool

source

pub fn bard_exe(&self) -> &Path

source

pub fn img_cache(&self) -> &ImgCache

source

pub fn parser_diags(&self) -> &ParserDiags

source

pub fn check_interrupted(&self) -> Result<(), InterruptError>

source

pub fn interrupt_flag(&self) -> InterruptFlag

source

pub fn child_wait(&self, child: &mut Child) -> Result<ExitStatus>

source

pub fn indent(&self, status: impl Display)

source

pub fn status(&self, verb: &str, status: impl Display)

source

pub fn status_bare(&self, verb: &str, status: impl Display)

Like status(), but no newline

source

pub fn success(&self, verb: impl Display)

source

pub fn warning(&self, msg: impl Display)

source

pub fn error(&self, error: Error)

source

pub fn error_generic(&self, msg: impl Display)

source

pub fn parser_diag(&self, diag: Diagnostic)

source

pub fn subprocess_output( &self, ps_lines: &mut ProcessLines, program: impl AsRef<OsStr>, status: &str ) -> Result<()>

Trait Implementations§

source§

impl Clone for App

source§

fn clone(&self) -> App

Returns a copy 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 App

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for App

§

impl Send for App

§

impl Sync for App

§

impl Unpin for App

§

impl !UnwindSafe for App

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Apply for T

source§

fn apply<F, R>(self, f: F) -> Rwhere F: FnOnce(T) -> R,

source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.