docs(codegen): Document improved VmType derive and the changes for newtypes
//! lifetime, the lifetime will be constrained to that of the `'vm` lifetime in the
//! trait definition.
//!
+//! __Note:__ Newtype structs are expected to be their inner type on the Gluon side.
+//!
//! #### Examples
//!
//! Marhalling this gluon type:
//! Derives `Pushable` for any enum or struct as long as all fields also implement
//! `Pushable` (generic type parameters included).
//!
+//! __Note:__ Newtype structs are pushed as their inner type.
+//!
//! #### Examples
//!
//! Allowing the `User` struct to be marshalled to gluon code:
//!
//! ### VmType
//!
-//! Derives `VmType` for a rust type, mapping it to a gluon type. You must specify
-//! the corresponding gluon type with the `#[gluon(vm_type = "<gluon_type>")]` attribute,
-//! where the gluon type is the fully qualified type name. The gluon type must be
-//! registered before a binding using the mapped rust type is first loaded.
+//! Derives `VmType` for a rust type, mapping it to a gluon type.
+//!
+//! Alternatively, you can specify the corresponding gluon type with the
+//! `#[gluon(vm_type = "<gluon_type>")]` attribute, where the gluon type is the fully qualified type name.
+//! The gluon type must be registered before a binding using the mapped rust type is first loaded.
//!
//! If the rust type has type parameters, they have to implement `VmType` as well.
//! All lifetimes have to be `'static`.
//!
+//! __Note:__ Newtype structs are mapped to their inner type.
+//!
//! #### Examples
//!
-//! Assuming the following gluon type in the module `types`:
+//! Deriving `VmType` for a struct:
+//!
+//! ```rust
+//! #[macro_use]
+//! extern crate gluon_codegen;
+//! extern crate gluon;
+//!
+//! // will map to: `{ string: String, number: Int, vec: Array Float }`
+//! #[derive(VmType)]
+//! struct Struct {
+//! string: String,
+//! number: u32,
+//! vec: Vec<f64>,
+//! }
+//! # fn main() {}
+//! ```
+//!
+//! Mapping to an existing type, assuming the following gluon type in the module `types`:
//!
//! ```gluon
//! type Either l r = | Left l | Right r
//! ```
//!
-//! This will map the correct rust type to it:
+//! Requires the additional `vm_type` attribute:
//!
//! ```rust
//! #[macro_use]
