[#btck-write_bytes] = xref:btck.adoc[btck]::write_bytes :relfileprefix: ../ :mrdocs: Serializes a C object into a byte vector using its `to_bytes` callback. == Synopsis Declared in `<kernel/bitcoinkernel_wrapper.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename T> std::vector<std::byte> write_bytes( T const* object, int(* to_bytes)(T const*, xref:btck_WriteBytes.adoc[btck_WriteBytes], void*)); ---- == Return Value The serialized bytes. == Parameters [cols="1,4"] |=== | Name| Description | *object* | The C object to serialize. | *to_bytes* | The `btck_*_to_bytes` function that streams the object's bytes. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#