3#include <StormByte/expected.hxx>
24namespace StormByte::Buffer {
47 enum class Position:
unsigned short {
64 enum class Status:
unsigned short {
88 enum class Status:
unsigned short {
137 using Byte = std::byte;
138 using Data = std::vector<Byte>;
139 using ByteSpan = std::span<Byte>;
140 using ConstByteSpan = std::span<const Byte>;
155 using PipeFunction = std::function<
void(Consumer, Producer)>;
156 using Processor = std::function<std::shared_ptr<Simple>(
const Simple&)>;
172 template <
typename PtrType,
typename T,
173 typename = std::enable_if_t<
174 (std::is_same_v<PtrType, std::shared_ptr<typename PtrType::element_type>> ||
175 std::is_same_v<PtrType, std::unique_ptr<typename PtrType::element_type>>)
179 static_assert(std::is_same_v<PtrType, std::shared_ptr<typename PtrType::element_type>> ||
180 std::is_same_v<PtrType, std::unique_ptr<typename PtrType::element_type>>,
181 "PtrType must be a std::shared_ptr or std::unique_ptr");
202 template <
typename PtrType,
typename T,
203 typename = std::enable_if_t<
204 (std::is_same_v<PtrType, std::shared_ptr<typename PtrType::element_type>> ||
205 std::is_same_v<PtrType, std::unique_ptr<typename PtrType::element_type>>)
209 static_assert(std::is_same_v<PtrType, std::shared_ptr<typename PtrType::element_type>> ||
210 std::is_same_v<PtrType, std::unique_ptr<typename PtrType::element_type>>,
211 "PtrType must be a std::shared_ptr or std::unique_ptr");
213 *
ptr << std::move(value);
Namespace for read-related utilities in the StormByte library.
std::conditional_t< is_reference< T >::value, std::expected< std::reference_wrapper< std::remove_reference_t< T > >, std::shared_ptr< E > >, std::expected< T, std::shared_ptr< E > > > Expected
Expected type with support for reference types.
Definition expected.hxx:32
Namespace for write-related utilities in the StormByte library.