@spec from_binary_data(binary(), module()) :: nil | no_return() | {struct(), binary()}
@spec to_binary_data(struct()) :: {iodata(), pos_integer()}