// Create a hierarchy with optional values of the following structure:
//
// root:
//   version: <version>
//   value: <value>
//
// The example tests expect version to be present and value to be in range [5, 10).
Create a hierarchy with optional values of the following structure:
root:
version: 
value: 

The example tests expect version to be present and value to be in range [5, 10).
Create a hierarchy with optional values of the following structure : root : version : value : The example tests expect version to be present and value to be in range [ 5 10 ) .
fn create_example_data(opts: ExampleDataOpts) -> Data<diagnostics_data::Inspect> {
    // Create the list of properties, leaving out those that were not set.
    let properties = vec![
        opts.version.as_ref().map(|v| Property::String("version".to_string(), v.to_string())),
        opts.value.as_ref().map(|v| Property::Uint("value".to_string(), *v)),
    ]
    .into_iter()
    .filter_map(|v| v)
    .collect();
    Data::for_inspect(
        "example",
        Some(DiagnosticsHierarchy::new("root", properties, vec![])),
        0,
        "no-url",
        "fake-file-name",
        vec![],
    )
}
fn create_example_data ( opts : ExampleDataOpts ) -> Data < diagnostics_data :: Inspect > { // Create the list of properties, leaving out those that were not set. let properties = vec ! [ opts version as_ref ( ) map ( v Property String ( " " to_string ( ) v to_string ( ) ) ) opts value as_ref ( ) map ( v Property Uint ( " " to_string ( ) v ) ) ] . into_iter ( ) . filter_map ( | v | v ) . collect ( ) ; Data :: for_inspect ( " " , Some ( DiagnosticsHierarchy :: new ( " " , properties , vec ! [ ] ) ) , 0 , " " , " " , vec ! [ ] , ) }
Create a hierarchy with optional values of the following structure:
root:
version: <version>
value: <value>
Create a hierarchy with optional values of the following structure : root : version : <version > value : <value >
opts
ExampleDataOpts