Skip to main content

clawless_core/
lib.rs

1#![cfg_attr(not(doctest),doc = include_str!("../README.md"))]
2
3pub mod cancellation;
4pub mod context;
5pub mod event;
6pub mod exit;
7pub mod output;
8pub mod process;
9pub mod prompt;
10
11// Signal-to-cancellation adapter used by the `main!()` macro expansion
12#[doc(hidden)]
13pub mod signal;
14
15/// A prelude module to easily import Clawless's core types and traits
16///
17/// This module re-exports the most commonly used items from the clawless-core crate. By importing
18/// everything from this module, users can conveniently access the necessary types and traits to
19/// define and run commands without needing to import each item individually.
20pub mod prelude {
21    pub use super::cancellation::Cancellation;
22    pub use super::context::{Context, ContextError, CurrentWorkingDirectory, Interactivity};
23    pub use super::exit::Exit;
24    pub use super::process::{Execution, Invocation, Process};
25    pub use super::prompt::{Confirmation, Prompt};
26}