7#include "void_span.hpp"
15namespace hi::inline v1 {
49[[nodiscard]] inline
std::string_view as_string_view(
resource_view const &rhs) noexcept
51 return as_string_view(rhs.span());
54[[nodiscard]]
inline bstring_view as_bstring_view(
resource_view const &rhs)
noexcept
56 return as_bstring_view(rhs.span());
59template<
typename T,
size_t E = std::dynamic_extent>
60[[nodiscard]]
inline std::span<T, E> as_span(resource_view
const& rhs)
noexcept requires(std::is_const_v<T>)
62 return as_span<T, E>(rhs.span());
65template<
typename T,
size_t E = std::dynamic_extent>
66[[nodiscard]]
inline std::span<T, E> as_writable_span(writable_resource_view& rhs)
noexcept
68 return as_span<T, E>(rhs.writable_span());
A read-only memory mapping of a resource.
Definition resource_view.hpp:20
virtual std::size_t offset() const noexcept=0
Offset into the resource file.
Definition resource_view.hpp:40
virtual void_span writable_span() noexcept=0
Get a span to the memory mapping.
Definition void_span.hpp:19
Definition void_span.hpp:156