diff options
| author | Henrik Tjäder <henrik@tjaders.com> | 2020-10-02 09:42:50 +0000 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2020-10-02 09:42:50 +0000 |
| commit | e6bc673621093c72f932cc38043c9fa951745450 (patch) | |
| tree | 23e06ddb8a915d6b4ad7e4aebe858ce6d617de26 /book | |
| parent | 9ca10b0d8c735a06a3a0a3623a7fc5d09b5e948c (diff) | |
Clarify the need for resources-attribute
Diffstat (limited to 'book')
| -rw-r--r-- | book/en/src/by-example/resources.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/book/en/src/by-example/resources.md b/book/en/src/by-example/resources.md index d63d135..62efdc6 100644 --- a/book/en/src/by-example/resources.md +++ b/book/en/src/by-example/resources.md @@ -9,6 +9,8 @@ can access which resource. All resources are declared as a single `struct` within the `#[app]` module. Each field in the structure corresponds to a different resource. +The `struct` must be annotated with the following attribute: `#[resources]`. + Resources can optionally be given an initial value using the `#[init]` attribute. Resources that are not given an initial value are referred to as *late* resources and are covered in more detail in a follow-up section in this |
