uv_req_t.lua 815 B

12345678910111213141516171819202122232425262728
  1. ---@meta
  2. -- luacheck: no unused args
  3. error('Cannot require a meta file')
  4. --- Base request
  5. ---
  6. --- `uv_req_t` is the base type for all libuv request types.
  7. ---
  8. ---@class uv.uv_req_t : table
  9. ---
  10. local req = {} -- luacheck: no unused
  11. --- Cancel a pending request. Fails if the request is executing or has finished
  12. --- executing. Only cancellation of `uv_fs_t`, `uv_getaddrinfo_t`,
  13. --- `uv_getnameinfo_t` and `uv_work_t` requests is currently supported.
  14. ---
  15. ---@return 0|nil success
  16. ---@return uv.error.message|nil err
  17. ---@return uv.error.name|nil err_name
  18. function req:cancel() end
  19. --- Returns the name of the struct for a given request (e.g. `"fs"` for `uv_fs_t`)
  20. --- and the libuv enum integer for the request's type (`uv_req_type`).
  21. ---
  22. ---@return string type
  23. ---@return integer enum
  24. function req:get_type() end