diff options
Diffstat (limited to 'meta/3rd/luv/library/uv_req_t.lua')
-rw-r--r-- | meta/3rd/luv/library/uv_req_t.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/3rd/luv/library/uv_req_t.lua b/meta/3rd/luv/library/uv_req_t.lua new file mode 100644 index 00000000..b39dc317 --- /dev/null +++ b/meta/3rd/luv/library/uv_req_t.lua @@ -0,0 +1,25 @@ +---@meta + +--- Base request +--- +--- `uv_req_t` is the base type for all libuv request types. +--- +---@class uv.uv_req_t : table +--- +local req + +--- Cancel a pending request. Fails if the request is executing or has finished +--- executing. Only cancellation of `uv_fs_t`, `uv_getaddrinfo_t`, +--- `uv_getnameinfo_t` and `uv_work_t` requests is currently supported. +--- +---@return 0|nil success +---@return uv.error.message|nil err +---@return uv.error.name|nil err_name +function req:cancel() end + +--- Returns the name of the struct for a given request (e.g. `"fs"` for `uv_fs_t`) +--- and the libuv enum integer for the request's type (`uv_req_type`). +--- +---@return string type +---@return integer enum +function req:get_type() end
\ No newline at end of file |