diff options
Diffstat (limited to 'crates/ra_syntax/src/ast/test.txt')
-rw-r--r-- | crates/ra_syntax/src/ast/test.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/test.txt b/crates/ra_syntax/src/ast/test.txt new file mode 100644 index 000000000..f746bf1e7 --- /dev/null +++ b/crates/ra_syntax/src/ast/test.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | The context is a general utility struct provided on event dispatches, which | ||
2 | helps with dealing with the current "context" of the event dispatch. | ||
3 | The context also acts as a general high-level interface over the associated | ||
4 | [`Shard`] which received the event, or the low-level [`http`] module. | ||
5 | |||
6 | The context contains "shortcuts", like for interacting with the shard. | ||
7 | Methods like [`set_activity`] will unlock the shard and perform an update for | ||
8 | you to save a bit of work. | ||
9 | |||
10 | A context will only live for the event it was dispatched for. After the | ||
11 | event handler finished, it is destroyed and will not be re-used. | ||
12 | |||
13 | [`Shard`]: ../gateway/struct.Shard.html | ||
14 | [`http`]: ../http/index.html | ||
15 | [`set_activity`]: #method.set_activity | ||