Tornado 6.5 Documentation
bool = False) → Future[None] Flushes the current output buffer to the network. Changed in version 4.0: Now returns a Future if no callback is given. Changed in version 6.0: The callback argument was removed textual formats will be compressed automatically. New in Tornado 4.0. • gzip: Deprecated alias for compress_response since Tornado 4.0. • log_function: This function will be called at the end of every given path. This method may be overridden by subclasses. Added in version 3.1. Changed in version 4.0: This method is now always called, instead of only when partial results are requested. get_modified_time()0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
What’s new in Tornado 4.1 What’s new in Tornado 4.0.2 What’s new in Tornado 4.0.1 What’s new in Tornado 4.0 What’s new in Tornado 3.2.2 What’s new in Tornado 3.2.1 What’s new in Tornado 3.2 What’s new in Tornado org/3/library/constants.html#None]] Flushes the current output buffer to the network. Changed in version 4.0: Now returns a Future if no callback is given. Changed in version 6.0: The callback argument was removed in textual formats will be compressed automatically. New in Tornado 4.0. gzip: Deprecated alias for compress_response since Tornado 4.0.log_function: This function will be called at the end of every request0 码力 | 437 页 | 405.14 KB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
y: T, } fn main() { let integer = Point { x: 5, y: 10 }; let float = Point { x: 1.0, y: 4.0 }; } 示例 10-6:Point 结构体存放了两个 T 类型的值 x 和 y 在结构体定义中使用泛型的语法类似于函数定义中使用泛型。首先,必须在结构体名称后面的 尖括号中声明泛型参数的名称 { let wont_work = Point { x: 5, y: 4.0 }; } 示例 10-7:字段 x 和 y 的类型必须相同,因为它们都有相同的泛型类型 T 在这个例子中,当把整型值 5 赋值给 x 时,就告诉了编译器这个 Point实例中的泛型 T 全 是整型。接着指定 y 为浮点值 4.0,因为 y 被定义为与 x 相同类型,所以将会得到一个像这 样的类型不匹配错误: error[E0308]: mismatched types --> src/main.rs:7:38 | 7 | let wont_work = Point { x: 5, y: 4.0 }; | ^^^ expected integer, found floating- point number For 0 码力 | 562 页 | 3.23 MB | 9 天前3
共 3 条
- 1