File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,17 @@ namespace sdk {
2121ViamChannel::RustDialData::RustDialData (const char * path_, void * runtime)
2222 : path(path_), rust_runtime(runtime) {}
2323
24+ ViamChannel::RustDialData::RustDialData (RustDialData&& other) noexcept
25+ : path(std::exchange(other.path, nullptr )),
26+ rust_runtime (std::exchange(other.rust_runtime, nullptr )) {}
27+
28+ ViamChannel::RustDialData& ViamChannel::RustDialData::operator =(RustDialData&& other) noexcept {
29+ path = std::exchange (other.path , nullptr );
30+ rust_runtime = std::exchange (other.rust_runtime , nullptr );
31+
32+ return *this ;
33+ }
34+
2435ViamChannel::RustDialData::~RustDialData () {
2536 free_string (path);
2637 free_rust_runtime (rust_runtime);
Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ class ViamChannel {
4646 private:
4747 struct RustDialData {
4848 RustDialData (const char * path_, void * runtime);
49+
50+ RustDialData (const RustDialData&) = delete ;
51+ RustDialData (RustDialData&&) noexcept ;
52+
53+ RustDialData& operator =(const RustDialData&) = delete ;
54+ RustDialData& operator =(RustDialData&&) noexcept ;
55+
4956 ~RustDialData ();
5057
5158 const char * path;
You can’t perform that action at this time.
0 commit comments