-
#include "tensorstore/kvstore/read_result.h"
- struct tensorstore::kvstore::ReadResult;
Result of a
Read
operation.Types¶
Methods¶
- static ReadResult Unspecified(TimestampedStorageGeneration stamp);
Constructs a read result with unspecified value and generation.
- static ReadResult Missing(TimestampedStorageGeneration stamp);
- static ReadResult Missing(absl::Time time);
Constructs a read result for a missing value.
-
static ReadResult
Value(absl::Cord value, TimestampedStorageGeneration stamp); Constructs a read result for a value.
- bool aborted() const;
Returns
true
if the read was aborted because the conditions were not satisfied.
- bool not_found() const;
Returns
true
if the key was not found.
- bool has_value() const;
Returns
true
if a value is available.
- std::optional<absl::Cord> optional_value() const&;
- std::optional<absl::Cord> optional_value() &&;
Data members¶
- State state = kUnspecified;
Indicates the interpretation of
value
.
Friend functions¶
- friend bool operator==(const ReadResult& a, const ReadResult& b);
- friend bool operator!=(const ReadResult& a, const ReadResult& b);
Compares two read results for equality.
-
friend std::ostream&
operator<<(std::ostream& os, const ReadResult& x); Prints a debugging string representation to an
std::ostream
.