The Encode! macro takes a sequence of Rust values, and returns a binary format Vec<u8> that can be sent over the wire.
The Decode! macro takes the binary message and a sequence of Rust types that you want to decode into, and returns a tuple
of Rust values of the given types.

Note that a fixed Candid message may be decoded in multiple Rust types. For example,
we can decode a Candid text type into either String or &str in Rust.

We use trait CandidType for serialization, and Serde's Deserialize trait for deserialization.
Any type that implements these two traits can be used for serialization and deserialization respectively.
This includes built-in Rust standard library types like Vec<T> and Result<T, E>, as well as any structs
or enums annotated with #[derive(CandidType, Deserialize)].

We do not use Serde's Serialize trait because Candid requires serializing types along with the values.
This is difficult to achieve in Serialize, especially for enum types. Besides serialization, CandidType
trait also converts Rust type to Candid type defined as candid::types::Type.

Any valid Candid value can be manipulated in an recursive enum representation candid::parser::value::IDLValue.
We use ser.value_arg(v) and de.get_value::<IDLValue>() for encoding and decoding the value.
The use of Rust value and IDLValue can be intermixed.

We provide a data structure candid::IDLArgs to represent a sequence of IDLValues,
and use to_bytes() and from_bytes() to encode and decode Candid messages.
We also provide a parser to parse Candid values in text format.

Decode Candid message into a tuple of Rust values of the given types.
Produces Err if the message fails to decode at any given types.
If the message contains only one value, it returns the value directly instead of a tuple.