Add example code snippet
All checks were successful
Homepage deployment / deploy (push) Successful in 1m56s

This commit is contained in:
GHOSCHT 2024-12-29 17:38:40 +01:00
parent 59d5e70de7
commit 3137e0c382
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82

View file

@ -10,7 +10,7 @@ tags = ["rust", "testing"]
Rust is hard. Rust is hard.
{{< /lead >}} {{< /lead >}}
That's one of my takeways from one of my recent endeavors during the winter break. That's one of my takeways from a recent endeavor during the winter break.
{{< forgejo repo="ghoscht/picoKontroller" >}} {{< forgejo repo="ghoscht/picoKontroller" >}}
@ -19,3 +19,14 @@ Rust isn't necessarily suited for pure object oriented programming.
## Getting Started ## Getting Started
Use [Shaku](https://github.com/AzureMarker/shaku) and [Mockall](https://github.com/asomers/mockall) Use [Shaku](https://github.com/AzureMarker/shaku) and [Mockall](https://github.com/asomers/mockall)
{{< highlight rust "linenos=table" >}}
#[derive(Parser)]
#[command(version, about, long_about = None)]
struct Cli {
#[arg(long, help = "List all available MIDI devices.")]
list_midi: bool,
#[arg(long, help = "List all available MPRIS players.")]
list_mpris: bool,
}
{{< / highlight >}}