Crate diesel_as_wrap

Crate diesel_as_wrap 

Source

Macrosยง

wrap
This macro helps creating wrapper types for use of not natively supported types in structs. It is still required to write the serialization and Deserialization logic for the wrapped types. This can be done inside this macro using simplified function syntax.
This macro will create a module containing 2 types one named As and one named AsOption.
These types can be used with the deserialize_as/serialize_as macro annotations.
The As type can be used for NonNullable sqlTypes and the AsOption for Nullable.
The types of the targeted struct fields should be your type or Option respectively.
The syntax for using this macro is the following:\