fungus 0.1.16

Rust utilities to reduce code verbosity
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
# https://rust-lang.github.io/rustfmt/
# https://github.com/rust-lang/rustfmt/blob/master/src/config/options.rs
# Check proper rustfmt.toml syntax
#
# rustfmt --check src/<file>

# Maximum width of an array literal before falling back to vertical formatting.
# https://rust-lang.github.io/rustfmt/?version=master&search=#array_width
#
# Default value: 60 percent of `max_width` provided by `width_heuristics`
# Possible values: any positive integer that is less than or equal to the value specified for `max_width`
# Stable: Yes
#
# Changed: modern monitors have more horizontal width than they used to
array_width = 60

# Maximum width of the args of a function-like attributes before falling back to vertical formatting.
# https://rust-lang.github.io/rustfmt/?version=master&search=#attr_fn_like_width
#
# Default value: 70 percent of `max_width` provided by `width_heuristics`
# Possible values: any positive integer that is less than or equal to the value specified for max_width
# Stable: Yes
#
# Changed: modern monitors have more horizontal width than they used to
attr_fn_like_width = 100

# Where to put a binary operator when a binary expression goes multiline.
# https://rust-lang.github.io/rustfmt/?version=master&search=#binop_separator
#
# Default value: "Front"
# Possible values: "Front", "Back"
# Stable: Yes
binop_separator = "Front"

# Minimum number of blank lines which must be put between statements
# https://rust-lang.github.io/rustfmt/?version=master&search=#blank_lines_lower_bound
#
# Default value: 0
# Possible values: unsigned integer
# Stable: No (tracking issue: #3382)
blank_lines_lower_bound = 0

# Maximum number of blank lines which can be put between statements
# https://rust-lang.github.io/rustfmt/?version=master&search=#blank_lines_upper_bound
#
# Default value: 1
# Possible values: any non-negative integer
# Stable: No (tracking issue: #3381)
blank_lines_upper_bound = 1

# Brace style for items
# https://rust-lang.github.io/rustfmt/?version=master&search=#brace_style
#
# Default value: "SameLineWhere"
# Possible values: "AlwaysNextLine", "PreferSameLine", "SameLineWhere"
# Stable: No (tracking issue: #3376)
brace_style = "SameLineWhere"

# Maximum width of a chain to fit on one line.
# https://rust-lang.github.io/rustfmt/?version=master&search=#chain_width
#
# Default value: 60 percent of `max_width` provided by `width_heuristics`
# Possible values: any positive integer that is less than or equal to the value specified for max_width
# Stable: Yes
#
# Changed: modern monitors have more horizontal width than they used to
chain_width = 150

# Combine control expressions with function calls.
# https://rust-lang.github.io/rustfmt/?version=master&search=#combine_control_expr
#
# Default value: true
# Possible values: true, false
# Stable: No (tracking issue: #3369)
combine_control_expr = true

# Maximum length of comments. No effect unlesswrap_comments = true.
# https://rust-lang.github.io/rustfmt/?version=master&search=#comment_width
#
# Default value: 80
# Possible values: any positive integer
# Stable: No (tracking issue: #3349)
#
# Changed: modern monitors have more horizontal width than they used to
comment_width = 100

# Replace strings of _ wildcards by a single .. in tuple patterns
#
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3384)
condense_wildcard_suffixes = true

# Brace style for control flow constructs
# https://rust-lang.github.io/rustfmt/?version=master&search=#control_brace_style
#
# Default value: "AlwaysSameLine"
# Possible values: "AlwaysNextLine", "AlwaysSameLine", "ClosingNextLine"
# Stable: No (tracking issue: #3377)
control_brace_style = "AlwaysSameLine"

# Specifies which edition is used by the parser.
# https://rust-lang.github.io/rustfmt/?version=master&search=#edition
#
# Default value: "2015"
# Possible values: "2015", "2018"
# Stable: Yes
edition = "2018"

# Put empty-body functions and impls on a single line
# https://rust-lang.github.io/rustfmt/?version=master&search=#empty_item_single_line
#
# Default value: true
# Possible values: true, false
# Stable: No (tracking issue: #3356)
empty_item_single_line = true

# The maximum length of enum variant having discriminant, that gets vertically aligned with others.
# Variants without discriminants would be ignored for the purpose of alignment.
# https://rust-lang.github.io/rustfmt/?version=master&search=#enum_discrim_align_threshold
#
# Default value : 0
# Possible values: any positive integer
# Stable: No (tracking issue: #3372)
enum_discrim_align_threshold = 0

# Error if Rustfmt is unable to get all lines within max_width, except for comments and string literals.
# https://rust-lang.github.io/rustfmt/?version=master&search=#error_on_line_overflow
#
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3391)
error_on_line_overflow = false

# Error if unable to get comments or string literals within max_width, or they are left with trailing whitespaces.
# https://rust-lang.github.io/rustfmt/?version=master&search=#error_on_unformatted
#
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3392)
error_on_unformatted = false

# Control the layout of parameters in a function signature
# https://rust-lang.github.io/rustfmt/?version=master&search=#fn_params_layout
#
# Default value: "Tall"
# Possible values: "Compressed", "Tall", "Vertical"
# Stable: Yes
#
# Changed: modern monitors have more horizontal width than they used to
fn_params_layout = "Compressed"

# Maximum width of the args of a function call before falling back to vertical formatting.
# https://rust-lang.github.io/rustfmt/?version=master&search=#fn_call_width
#
# Default value: 60 percent of `max_width` provided by `width_heuristics`
# Possible values: any positive integer that is less than or equal to the value specified for max_width
# Stable: Yes
#
# Changed: modern monitors have more horizontal width than they used to
fn_call_width = 190

# Put single-expression functions on a single line
# https://rust-lang.github.io/rustfmt/?version=master&search=#fn_single_line
#
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3358)
fn_single_line = false

# Always print the abi for extern items
# https://rust-lang.github.io/rustfmt/?version=master&search=#force_explicit_abi
#
# Default value: true
# Possible values: true, false
# Stable: Yes
# Note: Non-"C" ABIs are always printed. If false then "C" is removed.
force_explicit_abi = true

# Force multiline closure and match arm bodies to be wrapped in a block
# https://rust-lang.github.io/rustfmt/?version=master&search=#force_multiline_blocks
#
# Default value: false
# Possible values: false, true
# Stable: No (tracking issue: #3374)
force_multiline_blocks = false

# Format code snippet included in doc comments.
# https://rust-lang.github.io/rustfmt/?version=master&search=#format_code_in_doc_comments
#
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3348)
#
# Changed: enforces clean code formatting everywhere
format_code_in_doc_comments = true

# Format generated files. A file is considered as generated if the file starts
# with // @generated.
# https://rust-lang.github.io/rustfmt/?version=master&search=#format_generated_files
#
# Default value: false
# Possible values: true, false
# Stable: No
format_generated_files = false

# Format the metavariable matching patterns in macros.
# https://rust-lang.github.io/rustfmt/?version=master&search=#format_macro_matchers
# 
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3354)
format_macro_matchers = false

# Format the bodies of macros.
# https://rust-lang.github.io/rustfmt/?version=master&search=#format_macro_bodies
#
# Default value: true
# Possible values: true, false
# Stable: No (tracking issue: #3355)
format_macro_bodies = true

# Format string literals where necessary
# https://rust-lang.github.io/rustfmt/?version=master&search=#format_strings
# 
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3353)
format_strings = false

# Controls the strategy for how imports are grouped together.
# https://rust-lang.github.io/rustfmt/?version=master&search=#group_imports
#
# Default value: "Preserve"
# Possible values: Preserve, StdExternalCrate
# Stable: No
group_imports = "Preserve"

# Use tab characters for indentation, spaces for alignment
# https://rust-lang.github.io/rustfmt/?version=master&search=#hard_tabs
# 
# Default value: false
# Possible values: true, false
# Stable: Yes
hard_tabs = false

# Do not show parse errors if the parser failed to parse files.
# https://rust-lang.github.io/rustfmt/?version=master&search=#hide_parse_errors
# 
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3390)
hide_parse_errors = false

# Skip formatting files and directories that match the specified pattern.
# The pattern format is the same as .gitignore. Be sure to use
# Unix/forwardslash / style paths. This path style will work on all platforms.
# Windows style paths with backslashes \ are not supported.
# https://rust-lang.github.io/rustfmt/?version=master&search=#ignore
# 
# Default value: format every file
# Possible values: See an example below
# Stable: Yes
#
# ignore = [ "src/types.rs"]

# Indent style of imports
# https://rust-lang.github.io/rustfmt/?version=master&search=#imports_indent
# 
# Default Value: "Block"
# Possible values: "Block", "Visual"
# Stable: No (tracking issue: #3360)
imports_indent = "Block"

# Item layout inside a imports block
# https://rust-lang.github.io/rustfmt/?version=master&search=#imports_layout
# 
# Default value: "Mixed"
# Possible values: "Horizontal", "HorizontalVertical", "Mixed", "Vertical"
# Stable: No (tracking issue: #3361)
imports_layout = "Mixed"

# Indent on expressions or items.
# https://rust-lang.github.io/rustfmt/?version=master&search=#indent_style
# 
# Default value: "Block"
# Possible values: "Block", "Visual"
# Stable: No (tracking issue: #3346)
indent_style = "Block"

# Write an item and its attribute on the same line if their combined width is below a threshold
# https://rust-lang.github.io/rustfmt/?version=master&search=#inline_attribute_width
# 
# Default value: 0
# Possible values: any positive integer
# Stable: No (tracking issue: #3343)
inline_attribute_width = 0

# Check whether beginnings of files match a license template.
# https://rust-lang.github.io/rustfmt/?version=master&search=#license_template_path
# 
# Default value: ""
# Possible values: path to a license template file
# Stable: No (tracking issue: #3352)
license_template_path = ""

# Wrap the body of arms in blocks when it does not fit on the same line with the pattern of arms
# https://rust-lang.github.io/rustfmt/?version=master&search=#match_arm_blocks
# 
# Default value: true
# Possible values: true, false
# Stable: No (tracking issue: #3373)
match_arm_blocks = true

# Controls whether to include a leading pipe on match arms
# https://rust-lang.github.io/rustfmt/?version=master&search=#match_arm_leading_pipes
# 
# Default value: "Never"
# Possible values: Always, Never, Preserve
# Stable: Yes
match_arm_leading_pipes = "Never"

# Put a trailing comma after a block based match arm (non-block arms are not affected)
# https://rust-lang.github.io/rustfmt/?version=master&search=#match_block_trailing_comma
# 
# Default value: false
# Possible values: true, false
# Stable: Yes
#
# Changed: keeps it uniform with non-block arms
match_block_trailing_comma = true

# Maximum width of each line
# https://rust-lang.github.io/rustfmt/?version=master&search=#max_width
# 
# Default value: 100
# Possible values: any positive integer
# Stable: Yes
#
# Changed: modern monitors have more horizontal width than they used to
max_width = 250

# Merge multiple derives into a single one.
# https://rust-lang.github.io/rustfmt/?version=master&search=#merge_derives
# 
# Default value: true
# Possible values: true, false
# Stable: Yes
merge_derives = true

# Merge multiple imports into a single nested import.
# https://rust-lang.github.io/rustfmt/?version=master&search=#merge_imports
# 
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3362)
#
# Changed: modern monitors have more horizontal width than they used to
merge_imports = true

# Unix or Windows line endings
# https://rust-lang.github.io/rustfmt/?version=master&search=#newline_style
#
# Default value: "Auto"
# Possible values: "Auto", "Native", "Unix", "Windows"
# Stable: Yes
#
# Changed: keeps things more uniform
newline_style = "Unix"

# Convert /* */ comments to // comments where possible
# https://rust-lang.github.io/rustfmt/?version=master&search=#normalize_comments
# 
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3350)
#
# Changed: keeps things more uniform
normalize_comments = true

# Convert #![doc] and #[doc] attributes to //! and /// doc comments.
# https://rust-lang.github.io/rustfmt/?version=master&search=#normalize_doc_attributes
# 
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3351)
#
# Changed: keeps things more uniform
normalize_doc_attributes = true

# Preserves blanks lines at the start of the block. Note that this will preserve newlines,
# but strip any other whitespace on those lines.
# https://rust-lang.github.io/rustfmt/?version=master&search=#preserve_block_start_blank_lines
# 
# Default value: false
# Possible values: true, false
# Stable: No
preserve_block_start_blank_lines = false

# Preserves block wraping arround closures. For example, useful when the closure || can be confused with OR.
# https://rust-lang.github.io/rustfmt/?version=master&search=#preserve_closure_block_wrapping
# 
# Default value: false
# Possible values: true, false
# Stable: No
preserve_closure_block_wrapping = false

# When structs, slices, arrays, and block/array-like macros are used as the last argument
# in an expression list, allow them to overflow (like blocks/closures) instead of being
# indented on a new line.
# https://rust-lang.github.io/rustfmt/?version=master&search=#overflow_delimited_expr
# 
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3370)
#
# Changed: modern monitors have more horizontal width than they used to
overflow_delimited_expr = true

# Remove nested parens.
# https://rust-lang.github.io/rustfmt/?version=master&search=#remove_nested_parens
# 
# Default value: true
# Possible values: true, false
# Stable: Yes
remove_nested_parens = true

# Reorder impl items. type and const are put first, then macros and methods.
# https://rust-lang.github.io/rustfmt/?version=master&search=#reorder_impl_items
# 
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3363)
#
# Changed: keeps things more uniform
reorder_impl_items = true

# Reorder import and extern crate statements alphabetically in groups (a group is separated by a newline).
# https://rust-lang.github.io/rustfmt/?version=master&search=#reorder_imports
# 
# Default value: true
# Possible values: true, false
# Stable: Yes
reorder_imports = true

# Reorder mod declarations alphabetically in group.
# https://rust-lang.github.io/rustfmt/?version=master&search=#reorder_modules
# 
# Default value: true
# Possible values: true, false
# Stable: Yes
reorder_modules = true

# Require a specific version of rustfmt. If you want to make sure that the specific version of rustfmt is used in your CI, use this option.
# https://rust-lang.github.io/rustfmt/?version=master&search=#required_version
# 
# Default value: "CARGO_PKG_VERSION"
# Possible values: any published version (e.g. "0.3.8")
# Stable: No (tracking issue: #3386)
# required_version = "CARGO_PKG_VERSION"

# Leave a space after the colon.
# https://rust-lang.github.io/rustfmt/?version=master&search=#space_after_colon
# 
# Default value: true
# Possible values: true, false
# Stable: No (tracking issue: #3366)
space_after_colon = true

# Leave a space before the colon.
# https://rust-lang.github.io/rustfmt/?version=master&search=#space_before_colon
# 
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3365)
space_before_colon = false

# Whether to put a space before the opening paren in function signatures
# https://rust-lang.github.io/rustfmt/?version=master&search=#space_before_fn_sig_paren
# 
# Default value: false
# Possible values: true, false
# Stable: No
space_before_fn_sig_paren = false

# Put spaces around the .., ..=, and ... range operators
# https://rust-lang.github.io/rustfmt/?version=master&search=#spaces_around_ranges
# 
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3367)
spaces_around_ranges = false

# Determines if '=' are wrapped in spaces in attributes.
# https://rust-lang.github.io/rustfmt/?version=master&search=#space_around_attr_eq
# 
# Default value: true
# Possible values: true, false
# Stable: No
space_around_attr_eq = true

# The maximum diff of width between struct fields to be aligned with each other.
# https://rust-lang.github.io/rustfmt/?version=master&search=#struct_field_align_threshold
# 
# Default value : 0
# Possible values: any non-negative integer
# Stable: No (tracking issue: #3371)
struct_field_align_threshold = 0

# Put small struct literals on a single line
# https://rust-lang.github.io/rustfmt/?version=master&search=#struct_lit_single_line
# 
# Default value: true
# Possible values: true, false
# Stable: No (tracking issue: #3357)
struct_lit_single_line = true

# Maximum width in the body of a struct literal before falling back to vertical formatting.
# A value of 0 (zero) results in struct literals always being broken into multiple lines.
# Note this occurs when width_heuristics is set to Off.
# https://rust-lang.github.io/rustfmt/?version=master&search=#struct_lit_width
# 
# Default value: 18
# Possible values: any positive integer that is less than or equal to the value specified for max_width
# Stable: Yes
#
# Changed: more readable
struct_lit_width = 80

# Maximum width in the body of a struct variant before falling back to vertical formatting.
# A value of 0 (zero) results in struct literals always being broken into multiple lines.
# Note this occurs when width_heuristics is set to Off.
# https://rust-lang.github.io/rustfmt/?version=master&search=#struct_variant_width
# 
# Default value: 35 percent of `max_width` provided by `width_heuristics`
# Possible values: any positive integer that is less than or equal to the value specified for max_width
# Stable: Yes
struct_variant_width = 80

 # Number of spaces per tab
 # https://rust-lang.github.io/rustfmt/?version=master&search=#tab_spaces
 # 
 # Default value: 4
 # Possible values: any positive integer
 # Stable: Yes
tab_spaces = 4

# How to handle trailing commas for lists
# https://rust-lang.github.io/rustfmt/?version=master&search=#trailing_comma
# 
# Default value: "Vertical"
# Possible values: "Always", "Never", "Vertical"
# Stable: No (tracking issue: #3379)
trailing_comma = "Vertical"

# Add trailing semicolon after break, continue and return
# https://rust-lang.github.io/rustfmt/?version=master&search=#trailing_semicolon
# 
# Default value: true
# Possible values: true, false
# Stable: No (tracking issue: #3378)
trailing_semicolon = true

# Determines if + or = are wrapped in spaces in the punctuation of types
# https://rust-lang.github.io/rustfmt/?version=master&search=#type_punctuation_density
# 
# Default value: "Wide"
# Possible values: "Compressed", "Wide"
# Stable: No (tracking issue: #3364)
#
# Changed: more readable
type_punctuation_density = "Compressed"

# Enable unstable features on stable and beta channels (unstable features are available by default on nightly).
# https://rust-lang.github.io/rustfmt/?version=master&search=#unstable_features
# 
# Default value: false
# Possible values: true, false
# Stable: Yes
#
# Changed: use all the format features all the time
unstable_features = true

# Use field initialize shorthand if possible.
# https://rust-lang.github.io/rustfmt/?version=master&search=#use_field_init_shorthand
# 
# Default value: false
# Possible values: true, false
# Stable: Yes
#
# Changed: more readable
use_field_init_shorthand = true

# Replace uses of the try! macro by the ? shorthand
# https://rust-lang.github.io/rustfmt/?version=master&search=#use_try_shorthand
# 
# Default value: false
# Possible values: true, false
# Stable: Yes
#
# Changed: more readable
use_try_shorthand = true

# Forces the where clause to be laid out on a single line.
# https://rust-lang.github.io/rustfmt/?version=master&search=#where_single_line
# 
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3359)
where_single_line = false

# This option can be used to simplify the management and bulk updates of the granular width
# configuration settings (fn_call_width, attr_fn_like_width, struct_lit_width,
# struct_variant_width, array_width, chain_width, single_line_if_else_max_width),
# that respectively control when formatted constructs are multi-lined/vertical based on width.
# https://rust-lang.github.io/rustfmt/?version=master&search=#width_heuristics
#
# Default value: "Scaled"
# Possible values: "Scaled", "Off", "Max"
# Stable: Yes
width_heuristics = "Off"

# Break comments to fit on the line
# https://rust-lang.github.io/rustfmt/?version=master&search=#wrap_comments
# 
# Default value: false
# Possible values: true, false
# Stable: No (tracking issue: #3347)
#
# Changed: more readable
wrap_comments = true