diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2011-05-23 11:12:32 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2011-05-23 11:12:32 +0100 |
| commit | 6a62a4cde71a97bba4858b5566921ffad3f6a79e (patch) | |
| tree | 28d1d22cc2649f6603c25afa2c994d4035b5769b | |
| parent | 023d259b7a31b739fd5ae9426e3df96860e0f943 (diff) | |
| download | rabbitmq-server-git-6a62a4cde71a97bba4858b5566921ffad3f6a79e.tar.gz | |
Abstract the types
| -rw-r--r-- | src/rabbit_basic.erl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rabbit_basic.erl b/src/rabbit_basic.erl index 9397905f28..cccd028a5f 100644 --- a/src/rabbit_basic.erl +++ b/src/rabbit_basic.erl @@ -32,6 +32,9 @@ ({ok, rabbit_router:routing_result(), [pid()]} | rabbit_types:error('not_found'))). +-type(exchange_input() :: (rabbit_types:exchange() | rabbit_exchange:name())). +-type(body_input() :: (binary() | [binary()])). + -spec(publish/1 :: (rabbit_types:delivery()) -> publish_result()). -spec(delivery/5 :: @@ -48,14 +51,12 @@ -spec(properties/1 :: (properties_input()) -> rabbit_framing:amqp_property_record()). -spec(publish/4 :: - (rabbit_types:exchange() | rabbit_exchange:name(), - rabbit_router:routing_key(), properties_input(), - binary() | [binary()]) -> publish_result()). + (exchange_input(), rabbit_router:routing_key(), properties_input(), + body_input()) -> publish_result()). -spec(publish/7 :: - (rabbit_types:exchange() | rabbit_exchange:name(), - rabbit_router:routing_key(), boolean(), boolean(), + (exchange_input(), rabbit_router:routing_key(), boolean(), boolean(), rabbit_types:maybe(rabbit_types:txn()), properties_input(), - binary() | [binary()]) -> publish_result()). + body_input()) -> publish_result()). -spec(build_content/2 :: (rabbit_framing:amqp_property_record(), binary() | [binary()]) -> rabbit_types:content()). -spec(from_content/1 :: (rabbit_types:content()) -> |
