Vowpal Wabbit
Loading...
Searching...
No Matches
Namespaces | Functions
VW::model_utils Namespace Reference

Namespaces

namespace  details
 

Functions

size_t read_model_field (io_buf &io, action_score &a_s)
 
size_t write_model_field (io_buf &io, const action_score a_s, const std::string &upstream_name, bool text)
 
template<typename CMType >
size_t write_model_field (io_buf &, const VW::reductions::automl::automl< CMType > &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::reductions::automl::ns_based_config &)
 
template<typename estimator_impl >
size_t read_model_field (io_buf &, VW::reductions::automl::aml_estimator< estimator_impl > &)
 
template<typename config_oracle_impl , typename estimator_impl >
size_t read_model_field (io_buf &, VW::reductions::automl::interaction_config_manager< config_oracle_impl, estimator_impl > &)
 
template<typename CMType >
size_t read_model_field (io_buf &, VW::reductions::automl::automl< CMType > &)
 
size_t write_model_field (io_buf &, const VW::reductions::automl::ns_based_config &, const std::string &, bool)
 
template<typename estimator_impl >
size_t write_model_field (io_buf &, const VW::reductions::automl::aml_estimator< estimator_impl > &, const std::string &, bool)
 
template<typename config_oracle_impl , typename estimator_impl >
size_t write_model_field (io_buf &, const VW::reductions::automl::interaction_config_manager< config_oracle_impl, estimator_impl > &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::cb_class &)
 
size_t write_model_field (io_buf &, const VW::cb_class &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::cb_label &)
 
size_t write_model_field (io_buf &, const VW::cb_label &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::cb_eval_label &)
 
size_t write_model_field (io_buf &, const VW::cb_eval_label &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::cb_continuous::continuous_label_elm &)
 
size_t write_model_field (io_buf &, const VW::cb_continuous::continuous_label_elm &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::cb_continuous::continuous_label &)
 
size_t write_model_field (io_buf &, const VW::cb_continuous::continuous_label &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::continuous_actions::reduction_features &)
 
size_t write_model_field (io_buf &, const VW::continuous_actions::reduction_features &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::continuous_actions::pdf_segment &)
 
size_t write_model_field (io_buf &, const VW::continuous_actions::pdf_segment &, const std::string &, bool)
 
size_t read_model_field (io_buf &, cb_with_observations_label &)
 
size_t write_model_field (io_buf &, const cb_with_observations_label &, const std::string &, bool)
 
size_t read_model_field (io_buf &, ccb_outcome &)
 
size_t write_model_field (io_buf &, const ccb_outcome &, const std::string &, bool)
 
size_t read_model_field (io_buf &, ccb_label &)
 
size_t write_model_field (io_buf &, const ccb_label &, const std::string &, bool)
 
size_t read_model_field (io_buf &, cs_class &)
 
size_t write_model_field (io_buf &, const cs_class &, const std::string &, bool)
 
size_t read_model_field (io_buf &, cs_label &)
 
size_t write_model_field (io_buf &, const cs_label &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::details::incremental_f_sum &)
 
size_t write_model_field (io_buf &, const VW::details::incremental_f_sum &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::estimators::confidence_sequence &)
 
size_t write_model_field (io_buf &, const VW::estimators::confidence_sequence &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::details::g_tilde &)
 
size_t write_model_field (io_buf &, const VW::details::g_tilde &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::details::countable_discrete_base &)
 
size_t write_model_field (io_buf &, const VW::details::countable_discrete_base &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::estimators::confidence_sequence_robust &)
 
size_t write_model_field (io_buf &, const VW::estimators::confidence_sequence_robust &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::estimators::cressieread &)
 
size_t write_model_field (io_buf &, const VW::estimators::cressieread &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::details::Duals &)
 
size_t write_model_field (io_buf &, const VW::details::Duals &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::estimators::chi_squared &)
 
size_t write_model_field (io_buf &, const VW::estimators::chi_squared &, const std::string &, bool)
 
template<typename T , typename std::enable_if< !std::is_pointer< T >::value &&std::is_trivial< T >::value &&std::is_standard_layout< T >::value, bool >::type = true>
size_t read_model_field (io_buf &io, T &var)
 This function is the uniform interface reading a variable from the model file. The value must be a POD type. More...
 
template<typename T , typename std::enable_if< !std::is_pointer< T >::value &&std::is_trivial< T >::value &&std::is_standard_layout< T >::value, bool >::type = true>
size_t write_model_field (io_buf &io, const T &var, const std::string &name_or_readable_field_template, bool text)
 This function is the uniform interface for serializing a variable to the model file. The value must be a POD type. More...
 
size_t read_model_field (io_buf &, std::string &)
 
size_t write_model_field (io_buf &, const std::string &, const std::string &, bool)
 
template<typename T >
size_t read_model_field (io_buf &, std::set< T > &)
 
template<typename T >
size_t write_model_field (io_buf &, const std::set< T > &, const std::string &, bool)
 
template<typename T >
size_t read_model_field (io_buf &, std::vector< T > &)
 
template<typename T >
size_t write_model_field (io_buf &, const std::vector< T > &, const std::string &, bool)
 
template<typename T >
size_t read_model_field (io_buf &, v_array< T > &)
 
template<typename T >
size_t write_model_field (io_buf &, const v_array< T > &, const std::string &, bool)
 
template<typename F , typename S >
size_t read_model_field (io_buf &, std::pair< F, S > &)
 
template<typename F , typename S >
size_t write_model_field (io_buf &, const std::pair< F, S > &, const std::string &, bool)
 
template<typename T >
size_t read_model_field (io_buf &, std::priority_queue< T > &)
 
template<typename T >
size_t write_model_field (io_buf &, const std::priority_queue< T > &, const std::string &, bool)
 
template<typename K , typename V >
size_t read_model_field (io_buf &, std::map< K, V > &)
 
template<typename K , typename V >
size_t write_model_field (io_buf &, const std::map< K, V > &, const std::string &, bool)
 
template<typename T >
size_t read_model_field (io_buf &, std::unique_ptr< T > &)
 
template<typename T >
size_t write_model_field (io_buf &, const std::unique_ptr< T > &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::multiclass_label &)
 
size_t write_model_field (io_buf &, const VW::multiclass_label &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::multilabel_label &)
 
size_t write_model_field (io_buf &, const VW::multilabel_label &, const std::string &, bool)
 
size_t read_model_field (io_buf &io, reductions::eigen_memory_tree::emt_example &ex)
 
size_t write_model_field (io_buf &io, const reductions::eigen_memory_tree::emt_example &ex, const std::string &upstream_name, bool text)
 
size_t read_model_field (io_buf &io, reductions::eigen_memory_tree::emt_node &node)
 
size_t write_model_field (io_buf &io, const reductions::eigen_memory_tree::emt_node &node, const std::string &upstream_name, bool text)
 
size_t read_model_field (io_buf &io, reductions::eigen_memory_tree::emt_tree &tree)
 
size_t write_model_field (io_buf &io, const reductions::eigen_memory_tree::emt_tree &tree, const std::string &upstream_name, bool text)
 
size_t read_model_field (io_buf &, VW::reductions::epsilon_decay::epsilon_decay_data &)
 
size_t write_model_field (io_buf &, const VW::reductions::epsilon_decay::epsilon_decay_data &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::reductions::details::gd_per_model_state &)
 
size_t write_model_field (io_buf &, const VW::reductions::details::gd_per_model_state &, const std::string &, bool)
 
size_t write_model_field (io_buf &, const VW::reductions::igl::igl_data &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::reductions::igl::igl_data &)
 
size_t read_model_field (io_buf &, simple_label &)
 
size_t write_model_field (io_buf &, const simple_label &, const std::string &, bool)
 
size_t read_model_field (io_buf &, simple_label_reduction_features &)
 
size_t write_model_field (io_buf &, const simple_label_reduction_features &, const std::string &, bool)
 
size_t read_model_field (io_buf &, VW::slates::label &)
 
size_t write_model_field (io_buf &, const VW::slates::label &, const std::string &, bool)
 

Function Documentation

◆ read_model_field() [1/45]

size_t VW::model_utils::read_model_field ( io_buf ,
cb_with_observations_label  
)

◆ read_model_field() [2/45]

size_t VW::model_utils::read_model_field ( io_buf ,
ccb_label  
)

◆ read_model_field() [3/45]

size_t VW::model_utils::read_model_field ( io_buf ,
ccb_outcome  
)

◆ read_model_field() [4/45]

size_t VW::model_utils::read_model_field ( io_buf ,
cs_class  
)

◆ read_model_field() [5/45]

size_t VW::model_utils::read_model_field ( io_buf ,
cs_label  
)

◆ read_model_field() [6/45]

size_t VW::model_utils::read_model_field ( io_buf ,
simple_label  
)

◆ read_model_field() [7/45]

size_t VW::model_utils::read_model_field ( io_buf ,
simple_label_reduction_features  
)

◆ read_model_field() [8/45]

template<typename K , typename V >
size_t VW::model_utils::read_model_field ( io_buf io,
std::map< K, V > &  map 
)

◆ read_model_field() [9/45]

template<typename F , typename S >
size_t VW::model_utils::read_model_field ( io_buf io,
std::pair< F, S > &  pair 
)

◆ read_model_field() [10/45]

template<typename T >
size_t VW::model_utils::read_model_field ( io_buf io,
std::priority_queue< T > &  pq 
)

◆ read_model_field() [11/45]

template<typename T >
size_t VW::model_utils::read_model_field ( io_buf io,
std::set< T > &  set 
)

◆ read_model_field() [12/45]

size_t VW::model_utils::read_model_field ( io_buf io,
std::string &  str 
)
inline

◆ read_model_field() [13/45]

template<typename T >
size_t VW::model_utils::read_model_field ( io_buf io,
std::unique_ptr< T > &  ptr 
)

◆ read_model_field() [14/45]

template<typename T >
size_t VW::model_utils::read_model_field ( io_buf io,
std::vector< T > &  vec 
)

◆ read_model_field() [15/45]

template<typename T >
size_t VW::model_utils::read_model_field ( io_buf io,
v_array< T > &  vec 
)

◆ read_model_field() [16/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::cb_class  
)

◆ read_model_field() [17/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::cb_continuous::continuous_label  
)

◆ read_model_field() [18/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::cb_continuous::continuous_label_elm  
)

◆ read_model_field() [19/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::cb_eval_label  
)

◆ read_model_field() [20/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::cb_label  
)

◆ read_model_field() [21/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::continuous_actions::pdf_segment  
)

◆ read_model_field() [22/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::continuous_actions::reduction_features  
)

◆ read_model_field() [23/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::details::countable_discrete_base  
)

◆ read_model_field() [24/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::details::Duals  
)

◆ read_model_field() [25/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::details::g_tilde  
)

◆ read_model_field() [26/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::details::incremental_f_sum  
)

◆ read_model_field() [27/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::estimators::chi_squared  
)

◆ read_model_field() [28/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::estimators::confidence_sequence  
)

◆ read_model_field() [29/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::estimators::confidence_sequence_robust  
)

◆ read_model_field() [30/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::estimators::cressieread  
)

◆ read_model_field() [31/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::multiclass_label  
)

◆ read_model_field() [32/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::multilabel_label  
)

◆ read_model_field() [33/45]

template<typename estimator_impl >
size_t VW::model_utils::read_model_field ( io_buf ,
VW::reductions::automl::aml_estimator< estimator_impl > &   
)

◆ read_model_field() [34/45]

template<typename CMType >
size_t VW::model_utils::read_model_field ( io_buf ,
VW::reductions::automl::automl< CMType > &   
)

◆ read_model_field() [35/45]

template<typename config_oracle_impl , typename estimator_impl >
size_t VW::model_utils::read_model_field ( io_buf ,
VW::reductions::automl::interaction_config_manager< config_oracle_impl, estimator_impl > &   
)

◆ read_model_field() [36/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::reductions::automl::ns_based_config  
)

◆ read_model_field() [37/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::reductions::details::gd_per_model_state  
)

◆ read_model_field() [38/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::reductions::epsilon_decay::epsilon_decay_data  
)

◆ read_model_field() [39/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::reductions::igl::igl_data  
)

◆ read_model_field() [40/45]

size_t VW::model_utils::read_model_field ( io_buf ,
VW::slates::label  
)

◆ read_model_field() [41/45]

size_t VW::model_utils::read_model_field ( io_buf io,
action_score a_s 
)

◆ read_model_field() [42/45]

size_t VW::model_utils::read_model_field ( io_buf io,
reductions::eigen_memory_tree::emt_example ex 
)

◆ read_model_field() [43/45]

size_t VW::model_utils::read_model_field ( io_buf io,
reductions::eigen_memory_tree::emt_node node 
)

◆ read_model_field() [44/45]

size_t VW::model_utils::read_model_field ( io_buf io,
reductions::eigen_memory_tree::emt_tree tree 
)

◆ read_model_field() [45/45]

template<typename T , typename std::enable_if< !std::is_pointer< T >::value &&std::is_trivial< T >::value &&std::is_standard_layout< T >::value, bool >::type = true>
size_t VW::model_utils::read_model_field ( io_buf io,
T &  var 
)

This function is the uniform interface reading a variable from the model file. The value must be a POD type.

Template Parameters
Ttype of value to serialize or deserialize. This is important as it determines the number of bytes to be processed.
Parameters
iomodel file io_buf to read from or write to
varVariable to write into for the deserialized value. Must be a type which supports validly bit casting to a sequence of bytes. Does not need to be initialized.
Returns
size_t the number of bytes read

◆ write_model_field() [1/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const cb_with_observations_label ,
const std::string &  ,
bool   
)

◆ write_model_field() [2/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const ccb_label ,
const std::string &  ,
bool   
)

◆ write_model_field() [3/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const ccb_outcome ,
const std::string &  ,
bool   
)

◆ write_model_field() [4/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const cs_class ,
const std::string &  ,
bool   
)

◆ write_model_field() [5/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const cs_label ,
const std::string &  ,
bool   
)

◆ write_model_field() [6/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const simple_label ,
const std::string &  ,
bool   
)

◆ write_model_field() [7/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const simple_label_reduction_features ,
const std::string &  ,
bool   
)

◆ write_model_field() [8/45]

template<typename K , typename V >
size_t VW::model_utils::write_model_field ( io_buf io,
const std::map< K, V > &  map,
const std::string &  upstream_name,
bool  text 
)

◆ write_model_field() [9/45]

template<typename F , typename S >
size_t VW::model_utils::write_model_field ( io_buf io,
const std::pair< F, S > &  pair,
const std::string &  upstream_name,
bool  text 
)

◆ write_model_field() [10/45]

template<typename T >
size_t VW::model_utils::write_model_field ( io_buf io,
const std::priority_queue< T > &  pq,
const std::string &  upstream_name,
bool  text 
)

◆ write_model_field() [11/45]

template<typename T >
size_t VW::model_utils::write_model_field ( io_buf io,
const std::set< T > &  set,
const std::string &  upstream_name,
bool  text 
)

◆ write_model_field() [12/45]

size_t VW::model_utils::write_model_field ( io_buf io,
const std::string &  str,
const std::string &  upstream_name,
bool  text 
)
inline

◆ write_model_field() [13/45]

template<typename T >
size_t VW::model_utils::write_model_field ( io_buf io,
const std::unique_ptr< T > &  ptr,
const std::string &  upstream_name,
bool  text 
)

◆ write_model_field() [14/45]

template<typename T >
size_t VW::model_utils::write_model_field ( io_buf io,
const std::vector< T > &  vec,
const std::string &  upstream_name,
bool  text 
)

◆ write_model_field() [15/45]

template<typename T >
size_t VW::model_utils::write_model_field ( io_buf io,
const v_array< T > &  vec,
const std::string &  upstream_name,
bool  text 
)

◆ write_model_field() [16/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::cb_class ,
const std::string &  ,
bool   
)

◆ write_model_field() [17/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::cb_continuous::continuous_label ,
const std::string &  ,
bool   
)

◆ write_model_field() [18/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::cb_continuous::continuous_label_elm ,
const std::string &  ,
bool   
)

◆ write_model_field() [19/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::cb_eval_label ,
const std::string &  ,
bool   
)

◆ write_model_field() [20/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::cb_label ,
const std::string &  ,
bool   
)

◆ write_model_field() [21/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::continuous_actions::pdf_segment ,
const std::string &  ,
bool   
)

◆ write_model_field() [22/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::continuous_actions::reduction_features ,
const std::string &  ,
bool   
)

◆ write_model_field() [23/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::details::countable_discrete_base ,
const std::string &  ,
bool   
)

◆ write_model_field() [24/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::details::Duals ,
const std::string &  ,
bool   
)

◆ write_model_field() [25/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::details::g_tilde ,
const std::string &  ,
bool   
)

◆ write_model_field() [26/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::details::incremental_f_sum ,
const std::string &  ,
bool   
)

◆ write_model_field() [27/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::estimators::chi_squared ,
const std::string &  ,
bool   
)

◆ write_model_field() [28/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::estimators::confidence_sequence ,
const std::string &  ,
bool   
)

◆ write_model_field() [29/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::estimators::confidence_sequence_robust ,
const std::string &  ,
bool   
)

◆ write_model_field() [30/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::estimators::cressieread ,
const std::string &  ,
bool   
)

◆ write_model_field() [31/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::multiclass_label ,
const std::string &  ,
bool   
)

◆ write_model_field() [32/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::multilabel_label ,
const std::string &  ,
bool   
)

◆ write_model_field() [33/45]

template<typename estimator_impl >
size_t VW::model_utils::write_model_field ( io_buf ,
const VW::reductions::automl::aml_estimator< estimator_impl > &  ,
const std::string &  ,
bool   
)

◆ write_model_field() [34/45]

template<typename CMType >
size_t VW::model_utils::write_model_field ( io_buf ,
const VW::reductions::automl::automl< CMType > &  ,
const std::string &  ,
bool   
)

◆ write_model_field() [35/45]

template<typename config_oracle_impl , typename estimator_impl >
size_t VW::model_utils::write_model_field ( io_buf ,
const VW::reductions::automl::interaction_config_manager< config_oracle_impl, estimator_impl > &  ,
const std::string &  ,
bool   
)

◆ write_model_field() [36/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::reductions::automl::ns_based_config ,
const std::string &  ,
bool   
)

◆ write_model_field() [37/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::reductions::details::gd_per_model_state ,
const std::string &  ,
bool   
)

◆ write_model_field() [38/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::reductions::epsilon_decay::epsilon_decay_data ,
const std::string &  ,
bool   
)

◆ write_model_field() [39/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::reductions::igl::igl_data ,
const std::string &  ,
bool   
)

◆ write_model_field() [40/45]

size_t VW::model_utils::write_model_field ( io_buf ,
const VW::slates::label ,
const std::string &  ,
bool   
)

◆ write_model_field() [41/45]

size_t VW::model_utils::write_model_field ( io_buf io,
const action_score  a_s,
const std::string &  upstream_name,
bool  text 
)

◆ write_model_field() [42/45]

size_t VW::model_utils::write_model_field ( io_buf io,
const reductions::eigen_memory_tree::emt_example ex,
const std::string &  upstream_name,
bool  text 
)

◆ write_model_field() [43/45]

size_t VW::model_utils::write_model_field ( io_buf io,
const reductions::eigen_memory_tree::emt_node node,
const std::string &  upstream_name,
bool  text 
)

◆ write_model_field() [44/45]

size_t VW::model_utils::write_model_field ( io_buf io,
const reductions::eigen_memory_tree::emt_tree tree,
const std::string &  upstream_name,
bool  text 
)

◆ write_model_field() [45/45]

template<typename T , typename std::enable_if< !std::is_pointer< T >::value &&std::is_trivial< T >::value &&std::is_standard_layout< T >::value, bool >::type = true>
size_t VW::model_utils::write_model_field ( io_buf io,
const T &  var,
const std::string &  name_or_readable_field_template,
bool  text 
)

This function is the uniform interface for serializing a variable to the model file. The value must be a POD type.

Template Parameters
Ttype of value to serialize or deserialize. This is important as it determines the number of bytes to be processed.
Parameters
iomodel file io_buf to read from or write to
varvalue to serialize. Must be a type which supports validly bit casting to a sequence of bytes. Must be initialized.
name_or_readable_field_template(Only used when text == true) The name of the variable or a template string to use when writing.
  • If empty, then no output is written for this call
  • If the string contains a "{}", then the variable value will be substituted for that. Note: more than one "{}" in the string will result in a runtime error due to the templating failure.
  • Otherwise, if the string is non-empty and does not contain a "{}" the value will be used as the name of the variable and be outputted in the form ("{} = {}\n", name_or_readable_field_template, var)
textwhether to write in text mode or binary mode.
Returns
size_t the number of bytes written