diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2020-01-06 21:22:07 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2020-01-06 21:22:07 +0100 |
commit | 7d403431e354c4a24d7dfdbef3a39ab7297ae7b5 (patch) | |
tree | 251f40ac82488dc2690ff4dea6affc22085f7b48 /include | |
parent | 94f4127f71d0358424bbaba3e849c761903a75a1 (diff) |
Deep copy of object to different storage
Diffstat (limited to 'include')
-rw-r--r-- | include/erebos/storage.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/erebos/storage.h b/include/erebos/storage.h index 51fa3a4..d855460 100644 --- a/include/erebos/storage.h +++ b/include/erebos/storage.h @@ -74,6 +74,11 @@ public: Ref storeObject(const Record &) const; Ref storeObject(const Blob &) const; + std::variant<Ref, std::vector<Digest>> copy(const PartialRef &) const; + std::variant<Ref, std::vector<Digest>> copy(const PartialObject &) const; + Ref copy(const Ref &) const; + Ref copy(const Object &) const; + template<typename T> Stored<T> store(const T &) const; void storeKey(Ref pubref, const std::vector<uint8_t> &) const; @@ -89,7 +94,7 @@ public: static constexpr size_t size = 32; Digest(const Digest &) = default; - Digest & operator=(const Digest &) = delete; + Digest & operator=(const Digest &) = default; explicit Digest(std::array<uint8_t, size> value): value(value) {} explicit Digest(const std::string &); |