Tornado 6.5 Documentation
IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note that because the routing table does not change at runtime and is presumed to be permanent, while redirects found in handlers are likely to be the result of other logic that may change. To send a temporary redirect produce their own signed cookies. By default, Tornado’s signed cookies expire after 30 days. To change this, use the expires_days keyword argument to set_signed_cookie and the max_age_days argument to0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
Automatically detect code changes in development tornado.concurrent — Work with Future objects tornado.log — Logging support tornado.options — Command-line parsing tornado.testing — Unit testing support for IOLoop.spawn_callback, which makes the IOLoop responsible for the call. If it fails, the IOLoop will log a stack trace: # The IOLoop will catch the exception and print a stack trace in # the logs. Note because the routing table does not change at runtime and is presumed to be permanent, while redirects found in handlers are likely to be the result of other logic that may change. To send a temporary redirect0 码力 | 437 页 | 405.14 KB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
4-6 中的代码。剧透:这行不通! 文件名:src/main.rs fn main() { let s = String::from("hello"); change(&s); } fn change(some_string: &String) { some_string.push_str(", world"); } 示例 4-6:尝试修改借用的值 这里是错误: cannot be borrowed as mutable | help: consider changing this to be a mutable reference | 7 | fn change(some_string: &mut String) { | +++ 82/562Rust 程序设计语言 简体中文版 For more information mut s = String::from("hello"); change(&mut s); } fn change(some_string: &mut String) { some_string.push_str(", world"); } 首先,我们必须将 s 改为 mut。然后在调用 change 函数的地方创建一个可变引用 &mut s,并 更新函数签名以接受一个可变引用0 码力 | 562 页 | 3.23 MB | 9 天前3
共 3 条
- 1