Update book

This commit is contained in:
Sunli 2020-09-15 11:56:05 +08:00
parent 6b71ba87de
commit 32927f9836
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# Subscription
The definition of the subscription root object is slightly different from other root objects. Its resolver function always returns a [Stream](https://docs.rs/futures-core/~0.3/futures_core/stream/trait.Stream.html), and the field parameters are usually used as data filtering conditions.
The definition of the subscription root object is slightly different from other root objects. Its resolver function always returns a [Stream](https://docs.rs/futures-core/~0.3/futures_core/stream/trait.Stream.html) or `FieldResult<Stream>`, and the field parameters are usually used as data filtering conditions.
The following example subscribes to an integer stream, which generates one integer per second. The parameter `step` specifies the integer step size with a default of 1.

View File

@ -1,6 +1,6 @@
# 订阅
订阅根对象和其它根对象定义稍有不同它的Resolver函数总是返回一个`Stream`,而字段参数通常作为数据的筛选条件。
订阅根对象和其它根对象定义稍有不同它的Resolver函数总是返回一个 [Stream](https://docs.rs/futures-core/~0.3/futures_core/stream/trait.Stream.html) 或者`FieldResult<Stream>`,而字段参数通常作为数据的筛选条件。
下面的例子订阅一个整数流,它每秒产生一个整数,参数`step`指定了整数的步长默认为1。