Rust 程序设计语言 简体中文版 1.85.0
match 表达式和 if let 控 制流结构。在 Rust 中,创建自定义类型需要用到结构体和枚举。 第七章介绍 Rust 的模块(module)系统,其中的私有性规则用来组织代码和公开的 API(应 用程序接口)。第八章讨论标准库提供的常见集合数据结构,例如 Vector(向量)、字符串和 Hash Map(散列表)。第九章探索 Rust 的错误处理的理念与技术。 第十章深入介绍泛型(generic)、Trait rustup doc 在浏览器中查看本地 文档。 任何时候,如果你拿不准标准库中的类型或函数的用途和用法,请查阅应用程序接口 (application programming interface,API)文档! 文本编辑器和集成开发环境(Integrated Development Environments, IDE) 本书不会假设你使用何种工具来编写 Rust 代码。几乎任何文本编辑器都可以搞定!然而,很 程序设计语言 简体中文版 会覆盖其原有内容)到一个字符串中,因此它需要字符串作为参数。这个字符串参数应该是可 变的,以便 read_line 将用户输入附加上去。 & 表示这个参数是一个 引用(reference),它允许多处代码访问同一处数据,而无需在内存中 多次拷贝。引用是一个复杂的特性,Rust 的一个主要优势就是安全而简单的操纵引用。完成 当前程序并不需要了解如此多细节。现在,我们只需知道它像变量一样,默认是不可变的。因0 码力 | 562 页 | 3.23 MB | 9 天前3Tornado 6.5 Documentation
fetch("http://friendfeed-api.com/v2/feed/bret") json = tornado.escape.json_decode(response.body) self.write("Fetched " + str(len(json["entries"])) + " entries " "from the FriendFeed API") 26 Chapter 6. DocumentationTornado per-handler basis, you can override RequestHandler. check_xsrf_cookie(). For example, if you have an API whose authentication does not use cookies, you may want to disable XSRF protection by making check_xsrf_cookie() friendfeed_consumer_key, friendfeed_consumer_secret, google_consumer_key, google_consumer_secret, facebook_api_key, facebook_secret: Used in the tornado.auth module to authenticate to various APIs. Template settings:0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
http = tornado.httpclient.AsyncHTTPClient() response = await http.fetch("http://friendfeed- api.com/v2/feed/bret") json = tornado.escape.json_decode(response.body) self.write("Fetched write("Fetched " + str(len(json["entries"])) + " entries " "from the FriendFeed API") For a more advanced asynchronous example, take a look at the chat example application [https://github per-handler basis, you can override RequestHandler.check_xsrf_cookie(). For example, if you have an API whose authentication does not use cookies, you may want to disable XSRF protection by making check_xsrf_cookie()0 码力 | 437 页 | 405.14 KB | 2 月前3
共 3 条
- 1