summaryrefslogtreecommitdiff
path: root/argparse/src/action.rs
diff options
context:
space:
mode:
Diffstat (limited to 'argparse/src/action.rs')
-rw-r--r--argparse/src/action.rs33
1 files changed, 0 insertions, 33 deletions
diff --git a/argparse/src/action.rs b/argparse/src/action.rs
deleted file mode 100644
index c3a0aff..0000000
--- a/argparse/src/action.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-use std::cell::RefCell;
-use std::rc::Rc;
-
-pub enum ParseResult {
- Parsed,
- Help,
- Exit,
- Error(String),
-}
-
-
-pub enum Action<'a> {
- Flag(Box<IFlagAction + 'a>),
- Single(Box<IArgAction + 'a>),
- Push(Box<IArgsAction + 'a>),
- Many(Box<IArgsAction + 'a>),
-}
-
-pub trait TypedAction<T> {
- fn bind<'x>(&self, Rc<RefCell<&'x mut T>>) -> Action<'x>;
-}
-
-pub trait IFlagAction {
- fn parse_flag(&self) -> ParseResult;
-}
-
-pub trait IArgAction {
- fn parse_arg(&self, arg: &str) -> ParseResult;
-}
-
-pub trait IArgsAction {
- fn parse_args(&self, args: &[&str]) -> ParseResult;
-}