2020-06-16 08:16:39 -04:00
|
|
|
#if 0
|
2019-09-10 19:15:20 -04:00
|
|
|
#include "logging.hh"
|
2019-09-11 07:10:46 -04:00
|
|
|
#include "rust-ffi.hh"
|
2019-09-10 19:15:20 -04:00
|
|
|
|
|
|
|
extern "C" std::exception_ptr * make_error(rust::StringSlice s)
|
|
|
|
{
|
2019-12-05 13:11:09 -05:00
|
|
|
return new std::exception_ptr(std::make_exception_ptr(nix::Error(std::string(s.ptr, s.size))));
|
|
|
|
}
|
|
|
|
|
2019-12-13 13:05:09 -05:00
|
|
|
extern "C" void destroy_error(std::exception_ptr * ex)
|
|
|
|
{
|
|
|
|
free(ex);
|
|
|
|
}
|
|
|
|
|
2019-12-05 13:11:09 -05:00
|
|
|
namespace rust {
|
|
|
|
|
|
|
|
std::ostream & operator << (std::ostream & str, const String & s)
|
|
|
|
{
|
|
|
|
str << (std::string_view) s;
|
|
|
|
return str;
|
2019-09-10 19:15:20 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2020-06-16 08:16:39 -04:00
|
|
|
#endif
|