1#ifndef UVW_REQUEST_INCLUDE_H
2#define UVW_REQUEST_INCLUDE_H
18template<
typename T,
typename U,
typename... E>
21 static auto reserve(U *req) {
22 auto ptr =
static_cast<T *
>(req->data)->shared_from_this();
28 using resource<T, U, E...>::resource;
43 return uv_cancel(
reinterpret_cast<uv_req_t *
>(this->
raw()));
50 std::size_t
size() const noexcept {
51 return uv_req_size(
reinterpret_cast<const uv_req_t *
>(this->
raw())->
type);
int cancel()
Cancels a pending request.
std::size_t size() const noexcept
Returns the size of the underlying request type.
Common class for almost all the resources available in uvw.
static constexpr std::uint32_t type() noexcept
Returns a numerical identifier for a given type.
const U * raw() const noexcept
Gets the underlying raw data structure.