content_manifest_row_validation.h 568 B

12345678910111213141516171819
  1. #pragma once
  2. #include <span>
  3. #include "definition.h"
  4. namespace sunrise::state::content_manifest {
  5. /** @param row Candidate public package row. @return True when its disk fields are canonical. */
  6. [[nodiscard]] bool valid(const Row& row) noexcept;
  7. /**
  8. * Checks one catalog sorted by unique file name. A public package id may repeat.
  9. * @param rows Complete candidate catalog.
  10. * @return True when every row is canonical and the catalog is nonempty.
  11. */
  12. [[nodiscard]] bool valid(std::span<const Row> rows) noexcept;
  13. } // namespace sunrise::state::content_manifest