aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/test.txt
blob: f746bf1e725f3ab67afa0fd1cad3cdc56178fad6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
The context is a general utility struct provided on event dispatches, which
helps with dealing with the current "context" of the event dispatch.
The context also acts as a general high-level interface over the associated
[`Shard`] which received the event, or the low-level [`http`] module.

The context contains "shortcuts", like for interacting with the shard.
Methods like [`set_activity`] will unlock the shard and perform an update for
you to save a bit of work.

A context will only live for the event it was dispatched for. After the
event handler finished, it is destroyed and will not be re-used.

[`Shard`]: ../gateway/struct.Shard.html
[`http`]: ../http/index.html
[`set_activity`]: #method.set_activity