Write docs; Add missing docs warning
This commit is contained in:
parent
0ba3ed51e0
commit
7c9be2151d
@ -353,6 +353,19 @@ stdout_message = new Message {
|
|||||||
The `option(type)` type is expected to be either `some(value)` or `none`. The type of the value
|
The `option(type)` type is expected to be either `some(value)` or `none`. The type of the value
|
||||||
inside the `some` is always specified.
|
inside the `some` is always specified.
|
||||||
|
|
||||||
|
```dust
|
||||||
|
result <option(str)> = none
|
||||||
|
|
||||||
|
for file in fs:read_dir("./") {
|
||||||
|
if file:size > 100 {
|
||||||
|
result = some(file:path)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output(result)
|
||||||
|
```
|
||||||
|
|
||||||
```dust
|
```dust
|
||||||
get_line_break_index(text <str>) <some(int)> {
|
get_line_break_index(text <str>) <some(int)> {
|
||||||
str:find(text, '\n')
|
str:find(text, '\n')
|
||||||
@ -364,7 +377,7 @@ get_line_break_index(text <str>) <some(int)> {
|
|||||||
Custom types such as **structures** are referenced by their variable identifier.
|
Custom types such as **structures** are referenced by their variable identifier.
|
||||||
|
|
||||||
```dust
|
```dust
|
||||||
struct File {
|
File = struct {
|
||||||
path <str>
|
path <str>
|
||||||
size <int>
|
size <int>
|
||||||
type <str>
|
type <str>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![warn(missing_docs)]
|
||||||
|
|
||||||
//! The Dust library is used to parse, format and run dust source code.
|
//! The Dust library is used to parse, format and run dust source code.
|
||||||
//!
|
//!
|
||||||
//! See the [interpret] module for more information.
|
//! See the [interpret] module for more information.
|
||||||
|
Loading…
Reference in New Issue
Block a user