Making custom adapters
Making custom adapter is very easy. Unless it conforms to SCALE codec principles.
This might be very useful if you want to step out of SCALE's incremental way of serialization.
So let's assume we have a next type:
All custom adapters are subclasses of general ScaleCodecAdapter
class.
Subclasses need to implement two methods for reading and writing. For example, here is an adapter for MyCustomType
.
And then add this to provider like that:
Feel free to play with custom adapters as much as you want.
Last updated