Struct BuildPretty

Source
pub struct BuildPretty {
Show 13 fields pub tasks: Vec<(&'static str, Task)>, pub safe_panic: bool, pub cargo_pkg_name: Option<&'static str>, pub cargo_pkg_version: Option<&'static str>, pub message_warning_notice: Option<String>, pub message_process_begin: Option<String>, pub message_process_end: Option<String>, pub message_task_begin: Option<String>, pub message_task_body: Option<String>, pub message_task_succeeded: Option<String>, pub message_task_error: Option<String>, pub message_task_error_notice: Option<String>, pub message_safe_panic: Option<String>,
}

Fields§

§tasks: Vec<(&'static str, Task)>

[ ( task_name, task ), … ] Helper methods are available: for command: queue_command, queue_commands for fn : queue_fn , queue_fns

§safe_panic: bool

true => panic! if task was failed. (default) false => run all tasks and return results.

§cargo_pkg_name: Option<&'static str>

Replacement value of “{cargo_pkg_name}” in a message. see also: build_pretty! macro.

§cargo_pkg_version: Option<&'static str>

Replacement value of “{cargo_pkg_name}” in a message. see also: build_pretty! macro.

§message_warning_notice: Option<String>

Notice about warnings that are displayed on the left side by Cargo:warning. Set to None if not needed.

§message_process_begin: Option<String>

Template for a message announcing the start of the build process. Set to None if not needed.

§message_process_end: Option<String>

Template for a message announcing the end of the build process. Set to None if not needed.

§message_task_begin: Option<String>

Template for a message announcing the start of the task. Set to None if not needed.

§message_task_body: Option<String>

Template for a message from the task output. Set to None if not needed.

§message_task_succeeded: Option<String>

Template for a message announcing a succeeded of the task. Set to None if not needed.

§message_task_error: Option<String>

Template for a message announcing an error of the task. Set to None if not needed.

§message_task_error_notice: Option<String>

Template for a message announcing notice of an error of the task. Set to None if not needed.

§message_safe_panic: Option<String>

Template for the safe panic message. Set to None if not needed.

Implementations§

Source§

impl BuildPretty

Source

pub fn new() -> Self

Source

pub fn with_cargo_pkg_name(self, v: &'static str) -> Self

Source

pub fn with_cargo_pkg_version(self, v: &'static str) -> Self

Source

pub fn new_with_locale(locale: &str) -> Self

Source

pub fn enque_command( &mut self, task_name: &'static str, command: Command, ) -> &mut Self

Source

pub fn enque_commands( &mut self, task_name_and_commands: Vec<(&'static str, Command)>, ) -> &mut Self

Source

pub fn enque_fn(&mut self, task_name: &'static str, fun: TaskFn) -> &mut Self

Source

pub fn enque_fns( &mut self, task_name_and_funs: Vec<(&'static str, TaskFn)>, ) -> &mut Self

Source

pub fn invoke(&mut self) -> Vec<Result<String, BuildPrettyError>>

Trait Implementations§

Source§

impl Drop for BuildPretty

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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> 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, 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.