Function bitcoin_serialize::using

source ·
pub fn using<'a, Formatter, T>(t: T) -> Wrapper<'a, &'a mut T>
Expand description

| Cause serialization/deserialization | of an object to be done using a specified | formatter class. | | To use this, you need a class Formatter | that has public functions Ser(stream, | const object&) for serialization, | and Unser(stream, object&) for deserialization. | Serialization routines (inside | | READWRITE, or directly with << and >> | operators), can then use Using(object). | | This works by constructing a Wrapper<Formatter, | T>-wrapped version of object, where | T is const during serialization, and | non-const during deserialization, | which maintains const correctness. |