29std::unique_ptr<io::serialize::Value>
read_contents(StringRefNull filepath);
74 template<
typename U = T>
76 requires(std::is_same_v<U, std::monostate>)
85 template<
typename U = T>
87 requires(!std::is_same_v<U, std::monostate>)
90 result.success_value = std::move(value);
154 for (std::string &warning : other.
warnings) {
155 this->warnings.
append(std::move(warning));
169 without_value.
warnings.extend(this->warnings);
170 return without_value;
177 template<
typename U = T>
179 requires(!std::is_same_v<U, std::monostate>)
182 "Attempted to access value of non-success ReadingResult");
190 template<
typename U = T>
192 requires(!std::is_same_v<
U, std::monostate>)
195 "Attempted to access value of non-success ReadingResult");
203 template<
typename U = T>
205 requires(!std::is_same_v<U, std::monostate>)
215 template<
typename U = T>
217 requires(!std::is_same_v<
U, std::monostate>)
231 static_assert(std::is_same<U, std::monostate>::value,
232 "Cannot convert a valued success to another type");
252 const std::optional<Timestamp> ignore_before_timestamp = std::nullopt);
#define BLI_assert_msg(a, msg)
void append(const T &value)
void move_warnings_from(ReadingResult< U > &other)
const T * operator->() const
Vector< std::string > warnings
bool is_cancelled() const
std::optional< T > success_value
std::string failure_reason
ReadingResult(const ReadingResult< U > &other)
const T & operator*() const
ReadingResult without_success_value() const
static ReadingResult Success(T value)
static ReadingResult Success()
bool has_warnings() const
static ReadingResult Cancelled()
static ReadingResult Failure(const StringRef failure_reason)
ReadingResult read_remote_listing_v1(StringRefNull listing_root_dirpath, RemoteListingEntryProcessFn process_fn, RemoteListingWaitForPagesFn wait_fn=nullptr, const std::optional< Timestamp > ignore_before_timestamp=std::nullopt)
std::filesystem::file_time_type Timestamp
FunctionRef< bool(RemoteListingAssetEntry &)> RemoteListingEntryProcessFn
FunctionRef< bool()> RemoteListingWaitForPagesFn
std::optional< bool > file_older_than_timestamp(const char *filepath, Timestamp timestamp)
AssetMetaData * asset_metadata_from_dictionary(const io::serialize::DictionaryValue &entry)
std::unique_ptr< io::serialize::Value > read_contents(StringRefNull filepath)