nu_experimental/options/
example.rs

1use crate::*;
2
3/// Example experimental option.
4///
5/// This shows how experimental options should be implemented and documented.
6/// Reading this static's documentation alone should clearly explain what the
7/// option changes and how it interacts with the rest of the codebase.
8///
9/// Use this pattern when adding real experimental options.
10pub static EXAMPLE: ExperimentalOption = ExperimentalOption::new(&Example);
11
12// No documentation needed here since this type isn't public.
13// The static above provides all necessary details.
14struct Example;
15
16impl ExperimentalOptionMarker for Example {
17    const IDENTIFIER: &'static str = "example";
18    const DESCRIPTION: &'static str = "This is an example of an experimental option.";
19    const STATUS: Status = Status::DeprecatedDiscard;
20}