You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The as_ prefix supposes that the returned value still references to the original owner. E.g. KeyExpr::as_string_view is completely correct as the string view is just a refernence to value which contained in KeyExpt. On the other hand the to_ prefix supposes transferring the ownership. E.g. Config::to_string() creates new std::string object.
So normally the as_string and as_vector should be to_string and to_vector.
The proposal is:
add methods to_string and to_vector to Bytes
keep as_string and as_vector as the API is already stabilized, but mark them as deprecated and remove them from the documentation