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
use Yaml;
use cratePair;
/// Main callback to use to apply a YAML node configuration for Hyprland.
///
/// It is expected the function receives directly the root of the Hyprland
/// node, and not the parent one where the Hprland node is stored.
///
/// # Arguments
///
/// * `config` - The Hyprland configuration to explore. See Examples.
///
/// # Return
///
/// A Result object. Ok contains nothing while Error contains the reason of
/// the error as a String.
///
/// # Examples
///
/// This example (once parsed) is expected to be provided to the function :
///
/// ```ignore
/// general:
/// border_size: 1
/// col.inactive_border: rgb(ff0000) rgb(ffff00) 45rad
/// col.active_border: rgb(33ccff) rgb(00ff99) 45rad
/// ```
///
/// But not this (in this case, you should give the value of
/// `config["hyprland"]`) :
///
/// ```ignore
/// hyprland:
/// general:
/// border_size: 1
/// col.inactive_border: rgb(ff0000) rgb(ffff00) 45rad
/// col.active_border: rgb(33ccff) rgb(00ff99) 45rad
/// ```