diff options
| -rw-r--r-- | src/rabbit_cli.erl | 13 | ||||
| -rw-r--r-- | src/rabbit_misc.erl | 5 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/rabbit_cli.erl b/src/rabbit_cli.erl index 0c19c727a8..2981f3b2ce 100644 --- a/src/rabbit_cli.erl +++ b/src/rabbit_cli.erl @@ -24,14 +24,17 @@ -ifdef(use_specs). -type(optdef() :: flag | {option, string()}). +-type(parse_result() :: {'ok', {atom(), [{string(), string()}], [string()]}} | + 'no_command'). + +-spec(main/3 :: (fun (([string()], string()) -> parse_result()), + fun ((atom(), atom(), [any()], [any()]) -> any()), + atom()) -> no_return()). +-spec(usage/1 :: (atom()) -> no_return()). -spec(parse_arguments/4 :: ([{atom(), [{string(), optdef()}]} | atom()], - [{string(), optdef()}], - string(), - [string()]) - -> {'ok', {atom(), [{string(), string()}], [string()]}} | - 'no_command'). + [{string(), optdef()}], string(), [string()]) -> parse_result()). -endif. diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl index 3696698c73..84a00f0d7a 100644 --- a/src/rabbit_misc.erl +++ b/src/rabbit_misc.erl @@ -125,8 +125,11 @@ rabbit_types:r(any()), [binary()]) -> 'ok' | rabbit_types:connection_exit()). -spec(assert_field_equivalence/4 :: - (any(), any(), rabbit_types:r(any()), atom()) -> + (any(), any(), rabbit_types:r(any()), atom() | binary()) -> 'ok' | rabbit_types:connection_exit()). +-spec(equivalence_fail/4 :: + (any(), any(), rabbit_types:r(any()), atom() | binary()) -> + rabbit_types:connection_exit()). -spec(dirty_read/1 :: ({atom(), any()}) -> rabbit_types:ok_or_error2(any(), 'not_found')). -spec(table_lookup/2 :: |
