pub struct Action { /* private fields */ }Expand description
Action progress reporter.
Implementations§
Source§impl Action
impl Action
Sourcepub fn new<S1: ToString, S2: ToString, S3: ToString>(
actioning_verb: S1,
actioned_verb: S2,
detail: S3,
) -> Self
pub fn new<S1: ToString, S2: ToString, S3: ToString>( actioning_verb: S1, actioned_verb: S2, detail: S3, ) -> Self
Create and report a new in progress action.
§Limitations
- Anything else writing to the
stdout/stderrwill cause this to erase them unlessSelf::dont_eraseis called. - If the content is wrapped, this will erase part of it, keep details and verbs short.
Sourcepub fn report_fail(&mut self)
pub fn report_fail(&mut self)
Report the action as failed.
Sourcepub fn report_success(&mut self)
pub fn report_success(&mut self)
Report the action as a success.
Sourcepub fn print(&mut self)
pub fn print(&mut self)
Print the message for this action to stderr.
All IO errors are ignored.
Sourcepub fn dont_erase(&mut self)
pub fn dont_erase(&mut self)
Disable erasing the previous line on next print.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnwindSafe for Action
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more