Rust 程序设计语言 简体中文版 1.85.0
对低风险的操作,因为编译器会替你找到经典的错误。同时你可以自信地采取更加激进的优 化,而不会意外引入崩溃或漏洞。 但 Rust 并不局限于底层系统编程。它表达力强、写起来舒适,让人能够轻松地编写出命令行 应用、网络服务器等各种类型的代码——在本书中就有这两者的简单示例。使用 Rust 能让你 把在一个领域中学习的技能延伸到另一个领域:你可以通过编写网页应用来学习 Rust,接着 将同样的技能应用到你的 Raspberry 一个你无法修复的无效状 态,那么 panic! 往往是合适的。 然而当错误预期会出现时,返回 Result 仍要比调用 panic! 更为合适。这样的例子包括解析器 接收到格式错误的数据,或者 HTTP 请求返回了一个表明触发了限流的状态。在这些例子中, 应该通过返回 Result 来表明失败预期是可能的,而调用者就必须决定该如何处理这个问题。 当你的代码在进行一个使用无效值进行调用时可能将用户置于风险中的操作时,代码应该首先 以供他人使用。 发布 crate 时请多加小心,因为发布是永久性的(permanent)。对应版本不可能被覆盖,其 代码也不可能被删除。crates.io 的一个主要目标是作为一个存储代码的永久文档服务器,这样 309/562Rust 程序设计语言 简体中文版 所有依赖 crates.io 中的 crate 的项目都能一直正常工作。而允许删除版本没办法达成这个目 标。然而,可以被发布的版本号却没有限制。0 码力 | 562 页 | 3.23 MB | 8 天前3Tornado 6.5 Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.3 HTTP servers and clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . implementions of HTTP (HTTPServer and AsyncHTTPClient). • An asynchronous networking library including the classes IOLoop and IOStream, which serve as the building blocks for the HTTP components and can other protocols. The Tornado web framework and HTTP server together offer a full-stack alternative to WSGI. While it is possible to use the Tornado HTTP server as a container for other WSGI frameworks0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
Prerequisites: Tornado 6.3 requires Python 3.9 or newer. The following optional packages may be useful:pycurl [http://pycurl.io/] is used by the optional tornado.curl_httpclient. Libcurl version 7.22 or higher is required browser HTTP servers and clients tornado.httpserver — Non-blocking HTTP server tornado.httpclient — Asynchronous HTTP client tornado.httputil — Manipulate HTTP headers and URLs tornado.http1connection http1connection – HTTP/1.x client/server implementation Asynchronous networking tornado.ioloop — Main event loop tornado.iostream — Convenient wrappers for non-blocking socketstornado.netutil — Miscellaneous network0 码力 | 437 页 | 405.14 KB | 2 月前3
共 3 条
- 1