Struct CreateAppRequestDataAttributes

Source
#[non_exhaustive]
pub struct CreateAppRequestDataAttributes { pub components: Option<Vec<ComponentGrid>>, pub description: Option<String>, pub name: Option<String>, pub queries: Option<Vec<Query>>, pub root_instance_name: Option<String>, pub tags: Option<Vec<String>>, pub additional_properties: BTreeMap<String, Value>, /* private fields */ }
Expand description

App definition attributes such as name, description, and components.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§components: Option<Vec<ComponentGrid>>

The UI components that make up the app.

§description: Option<String>

A human-readable description for the app.

§name: Option<String>

The name of the app.

§queries: Option<Vec<Query>>

An array of queries, such as external actions and state variables, that the app uses.

§root_instance_name: Option<String>

The name of the root component of the app. This must be a grid component that contains all other components.

§tags: Option<Vec<String>>

A list of tags for the app, which can be used to filter apps.

§additional_properties: BTreeMap<String, Value>

Implementations§

Source§

impl CreateAppRequestDataAttributes

Source

pub fn new() -> CreateAppRequestDataAttributes

Examples found in repository?
examples/v2_app-builder_CreateApp.rs (line 43)
36async fn main() {
37    let body =
38        CreateAppRequest
39        ::new().data(
40            CreateAppRequestData::new(
41                AppDefinitionType::APPDEFINITIONS,
42            ).attributes(
43                CreateAppRequestDataAttributes::new()
44                    .components(
45                        vec![
46                            ComponentGrid::new(
47                                "grid0".to_string(),
48                                ComponentGridProperties::new()
49                                    .background_color("default".to_string())
50                                    .children(
51                                        vec![
52                                            Component::new(
53                                                "gridCell0".to_string(),
54                                                ComponentProperties::new()
55                                                    .children(
56                                                        vec![
57                                                            Component::new(
58                                                                "text0".to_string(),
59                                                                ComponentProperties
60                                                                ::new().is_visible(
61                                                                    ComponentPropertiesIsVisible::Bool(true),
62                                                                ),
63                                                                ComponentType::TEXT,
64                                                            ).events(vec![])
65                                                        ],
66                                                    )
67                                                    .is_visible(
68                                                        ComponentPropertiesIsVisible::String("true".to_string()),
69                                                    ),
70                                                ComponentType::GRIDCELL,
71                                            ).events(vec![]),
72                                            Component::new(
73                                                "gridCell2".to_string(),
74                                                ComponentProperties::new()
75                                                    .children(
76                                                        vec![
77                                                            Component::new(
78                                                                "table0".to_string(),
79                                                                ComponentProperties
80                                                                ::new().is_visible(
81                                                                    ComponentPropertiesIsVisible::Bool(true),
82                                                                ),
83                                                                ComponentType::TABLE,
84                                                            ).events(vec![])
85                                                        ],
86                                                    )
87                                                    .is_visible(
88                                                        ComponentPropertiesIsVisible::String("true".to_string()),
89                                                    ),
90                                                ComponentType::GRIDCELL,
91                                            ).events(vec![]),
92                                            Component::new(
93                                                "gridCell1".to_string(),
94                                                ComponentProperties::new()
95                                                    .children(
96                                                        vec![
97                                                            Component::new(
98                                                                "text1".to_string(),
99                                                                ComponentProperties
100                                                                ::new().is_visible(
101                                                                    ComponentPropertiesIsVisible::Bool(true),
102                                                                ),
103                                                                ComponentType::TEXT,
104                                                            ).events(vec![])
105                                                        ],
106                                                    )
107                                                    .is_visible(
108                                                        ComponentPropertiesIsVisible::String("true".to_string()),
109                                                    ),
110                                                ComponentType::GRIDCELL,
111                                            ).events(vec![]),
112                                            Component::new(
113                                                "gridCell3".to_string(),
114                                                ComponentProperties::new()
115                                                    .children(
116                                                        vec![
117                                                            Component::new(
118                                                                "button0".to_string(),
119                                                                ComponentProperties
120                                                                ::new().is_visible(
121                                                                    ComponentPropertiesIsVisible::Bool(true),
122                                                                ),
123                                                                ComponentType::BUTTON,
124                                                            ).events(
125                                                                vec![
126                                                                    AppBuilderEvent::new()
127                                                                        .name(AppBuilderEventName::CLICK)
128                                                                        .type_(
129                                                                            AppBuilderEventType::SETSTATEVARIABLEVALUE,
130                                                                        )
131                                                                ],
132                                                            )
133                                                        ],
134                                                    )
135                                                    .is_visible(
136                                                        ComponentPropertiesIsVisible::String("true".to_string()),
137                                                    ),
138                                                ComponentType::GRIDCELL,
139                                            ).events(vec![]),
140                                            Component::new(
141                                                "gridCell4".to_string(),
142                                                ComponentProperties::new()
143                                                    .children(
144                                                        vec![
145                                                            Component::new(
146                                                                "button1".to_string(),
147                                                                ComponentProperties
148                                                                ::new().is_visible(
149                                                                    ComponentPropertiesIsVisible::Bool(true),
150                                                                ),
151                                                                ComponentType::BUTTON,
152                                                            ).events(
153                                                                vec![
154                                                                    AppBuilderEvent::new()
155                                                                        .name(AppBuilderEventName::CLICK)
156                                                                        .type_(
157                                                                            AppBuilderEventType::SETSTATEVARIABLEVALUE,
158                                                                        )
159                                                                ],
160                                                            )
161                                                        ],
162                                                    )
163                                                    .is_visible(
164                                                        ComponentPropertiesIsVisible::String("true".to_string()),
165                                                    ),
166                                                ComponentType::GRIDCELL,
167                                            ).events(vec![])
168                                        ],
169                                    ),
170                                ComponentGridType::GRID,
171                            ).events(vec![])
172                        ],
173                    )
174                    .description(
175                        "This is a slightly complicated example app that fetches and displays cat facts".to_string(),
176                    )
177                    .name("Example Cat Facts Viewer".to_string())
178                    .queries(
179                        vec![
180                            Query::ActionQuery(
181                                Box::new(
182                                    ActionQuery::new(
183                                        Uuid::parse_str(
184                                            "92ff0bb8-553b-4f31-87c7-ef5bd16d47d5",
185                                        ).expect("invalid UUID"),
186                                        "fetchFacts".to_string(),
187                                        ActionQueryProperties::new(
188                                            ActionQuerySpec::ActionQuerySpecObject(
189                                                Box::new(
190                                                    ActionQuerySpecObject::new(
191                                                        "com.datadoghq.http.request".to_string(),
192                                                    )
193                                                        .connection_id(
194                                                            "5e63f4a8-4ce6-47de-ba11-f6617c1d54f3".to_string(),
195                                                        )
196                                                        .inputs(
197                                                            ActionQuerySpecInputs::ActionQuerySpecInput(
198                                                                BTreeMap::from(
199                                                                    [
200                                                                        ("verb".to_string(), Value::from("GET")),
201                                                                        (
202                                                                            "url".to_string(),
203                                                                            Value::from(
204                                                                                "https://catfact.ninja/facts",
205                                                                            ),
206                                                                        ),
207                                                                    ],
208                                                                ),
209                                                            ),
210                                                        ),
211                                                ),
212                                            ),
213                                        ),
214                                        ActionQueryType::ACTION,
215                                    ).events(vec![]),
216                                ),
217                            ),
218                            Query::StateVariable(
219                                Box::new(
220                                    StateVariable::new(
221                                        Uuid::parse_str(
222                                            "afd03c81-4075-4432-8618-ba09d52d2f2d",
223                                        ).expect("invalid UUID"),
224                                        "pageSize".to_string(),
225                                        StateVariableProperties::new().default_value(Value::from("${20}")),
226                                        StateVariableType::STATEVARIABLE,
227                                    ),
228                                ),
229                            ),
230                            Query::DataTransform(
231                                Box::new(
232                                    DataTransform::new(
233                                        Uuid::parse_str(
234                                            "0fb22859-47dc-4137-9e41-7b67d04c525c",
235                                        ).expect("invalid UUID"),
236                                        "randomFact".to_string(),
237                                        DataTransformProperties
238                                        ::new().outputs(
239                                            r#"${(() => {const facts = fetchFacts.outputs.body.data
240return facts[Math.floor(Math.random()*facts.length)]
241})()}"#.to_string(),
242                                        ),
243                                        DataTransformType::DATATRANSFORM,
244                                    ),
245                                ),
246                            )
247                        ],
248                    )
249                    .root_instance_name("grid0".to_string()),
250            ),
251        );
252    let configuration = datadog::Configuration::new();
253    let api = AppBuilderAPI::with_config(configuration);
254    let resp = api.create_app(body).await;
255    if let Ok(value) = resp {
256        println!("{:#?}", value);
257    } else {
258        println!("{:#?}", resp.unwrap_err());
259    }
260}
Source

pub fn components(self, value: Vec<ComponentGrid>) -> Self

Examples found in repository?
examples/v2_app-builder_CreateApp.rs (lines 44-173)
36async fn main() {
37    let body =
38        CreateAppRequest
39        ::new().data(
40            CreateAppRequestData::new(
41                AppDefinitionType::APPDEFINITIONS,
42            ).attributes(
43                CreateAppRequestDataAttributes::new()
44                    .components(
45                        vec![
46                            ComponentGrid::new(
47                                "grid0".to_string(),
48                                ComponentGridProperties::new()
49                                    .background_color("default".to_string())
50                                    .children(
51                                        vec![
52                                            Component::new(
53                                                "gridCell0".to_string(),
54                                                ComponentProperties::new()
55                                                    .children(
56                                                        vec![
57                                                            Component::new(
58                                                                "text0".to_string(),
59                                                                ComponentProperties
60                                                                ::new().is_visible(
61                                                                    ComponentPropertiesIsVisible::Bool(true),
62                                                                ),
63                                                                ComponentType::TEXT,
64                                                            ).events(vec![])
65                                                        ],
66                                                    )
67                                                    .is_visible(
68                                                        ComponentPropertiesIsVisible::String("true".to_string()),
69                                                    ),
70                                                ComponentType::GRIDCELL,
71                                            ).events(vec![]),
72                                            Component::new(
73                                                "gridCell2".to_string(),
74                                                ComponentProperties::new()
75                                                    .children(
76                                                        vec![
77                                                            Component::new(
78                                                                "table0".to_string(),
79                                                                ComponentProperties
80                                                                ::new().is_visible(
81                                                                    ComponentPropertiesIsVisible::Bool(true),
82                                                                ),
83                                                                ComponentType::TABLE,
84                                                            ).events(vec![])
85                                                        ],
86                                                    )
87                                                    .is_visible(
88                                                        ComponentPropertiesIsVisible::String("true".to_string()),
89                                                    ),
90                                                ComponentType::GRIDCELL,
91                                            ).events(vec![]),
92                                            Component::new(
93                                                "gridCell1".to_string(),
94                                                ComponentProperties::new()
95                                                    .children(
96                                                        vec![
97                                                            Component::new(
98                                                                "text1".to_string(),
99                                                                ComponentProperties
100                                                                ::new().is_visible(
101                                                                    ComponentPropertiesIsVisible::Bool(true),
102                                                                ),
103                                                                ComponentType::TEXT,
104                                                            ).events(vec![])
105                                                        ],
106                                                    )
107                                                    .is_visible(
108                                                        ComponentPropertiesIsVisible::String("true".to_string()),
109                                                    ),
110                                                ComponentType::GRIDCELL,
111                                            ).events(vec![]),
112                                            Component::new(
113                                                "gridCell3".to_string(),
114                                                ComponentProperties::new()
115                                                    .children(
116                                                        vec![
117                                                            Component::new(
118                                                                "button0".to_string(),
119                                                                ComponentProperties
120                                                                ::new().is_visible(
121                                                                    ComponentPropertiesIsVisible::Bool(true),
122                                                                ),
123                                                                ComponentType::BUTTON,
124                                                            ).events(
125                                                                vec![
126                                                                    AppBuilderEvent::new()
127                                                                        .name(AppBuilderEventName::CLICK)
128                                                                        .type_(
129                                                                            AppBuilderEventType::SETSTATEVARIABLEVALUE,
130                                                                        )
131                                                                ],
132                                                            )
133                                                        ],
134                                                    )
135                                                    .is_visible(
136                                                        ComponentPropertiesIsVisible::String("true".to_string()),
137                                                    ),
138                                                ComponentType::GRIDCELL,
139                                            ).events(vec![]),
140                                            Component::new(
141                                                "gridCell4".to_string(),
142                                                ComponentProperties::new()
143                                                    .children(
144                                                        vec![
145                                                            Component::new(
146                                                                "button1".to_string(),
147                                                                ComponentProperties
148                                                                ::new().is_visible(
149                                                                    ComponentPropertiesIsVisible::Bool(true),
150                                                                ),
151                                                                ComponentType::BUTTON,
152                                                            ).events(
153                                                                vec![
154                                                                    AppBuilderEvent::new()
155                                                                        .name(AppBuilderEventName::CLICK)
156                                                                        .type_(
157                                                                            AppBuilderEventType::SETSTATEVARIABLEVALUE,
158                                                                        )
159                                                                ],
160                                                            )
161                                                        ],
162                                                    )
163                                                    .is_visible(
164                                                        ComponentPropertiesIsVisible::String("true".to_string()),
165                                                    ),
166                                                ComponentType::GRIDCELL,
167                                            ).events(vec![])
168                                        ],
169                                    ),
170                                ComponentGridType::GRID,
171                            ).events(vec![])
172                        ],
173                    )
174                    .description(
175                        "This is a slightly complicated example app that fetches and displays cat facts".to_string(),
176                    )
177                    .name("Example Cat Facts Viewer".to_string())
178                    .queries(
179                        vec![
180                            Query::ActionQuery(
181                                Box::new(
182                                    ActionQuery::new(
183                                        Uuid::parse_str(
184                                            "92ff0bb8-553b-4f31-87c7-ef5bd16d47d5",
185                                        ).expect("invalid UUID"),
186                                        "fetchFacts".to_string(),
187                                        ActionQueryProperties::new(
188                                            ActionQuerySpec::ActionQuerySpecObject(
189                                                Box::new(
190                                                    ActionQuerySpecObject::new(
191                                                        "com.datadoghq.http.request".to_string(),
192                                                    )
193                                                        .connection_id(
194                                                            "5e63f4a8-4ce6-47de-ba11-f6617c1d54f3".to_string(),
195                                                        )
196                                                        .inputs(
197                                                            ActionQuerySpecInputs::ActionQuerySpecInput(
198                                                                BTreeMap::from(
199                                                                    [
200                                                                        ("verb".to_string(), Value::from("GET")),
201                                                                        (
202                                                                            "url".to_string(),
203                                                                            Value::from(
204                                                                                "https://catfact.ninja/facts",
205                                                                            ),
206                                                                        ),
207                                                                    ],
208                                                                ),
209                                                            ),
210                                                        ),
211                                                ),
212                                            ),
213                                        ),
214                                        ActionQueryType::ACTION,
215                                    ).events(vec![]),
216                                ),
217                            ),
218                            Query::StateVariable(
219                                Box::new(
220                                    StateVariable::new(
221                                        Uuid::parse_str(
222                                            "afd03c81-4075-4432-8618-ba09d52d2f2d",
223                                        ).expect("invalid UUID"),
224                                        "pageSize".to_string(),
225                                        StateVariableProperties::new().default_value(Value::from("${20}")),
226                                        StateVariableType::STATEVARIABLE,
227                                    ),
228                                ),
229                            ),
230                            Query::DataTransform(
231                                Box::new(
232                                    DataTransform::new(
233                                        Uuid::parse_str(
234                                            "0fb22859-47dc-4137-9e41-7b67d04c525c",
235                                        ).expect("invalid UUID"),
236                                        "randomFact".to_string(),
237                                        DataTransformProperties
238                                        ::new().outputs(
239                                            r#"${(() => {const facts = fetchFacts.outputs.body.data
240return facts[Math.floor(Math.random()*facts.length)]
241})()}"#.to_string(),
242                                        ),
243                                        DataTransformType::DATATRANSFORM,
244                                    ),
245                                ),
246                            )
247                        ],
248                    )
249                    .root_instance_name("grid0".to_string()),
250            ),
251        );
252    let configuration = datadog::Configuration::new();
253    let api = AppBuilderAPI::with_config(configuration);
254    let resp = api.create_app(body).await;
255    if let Ok(value) = resp {
256        println!("{:#?}", value);
257    } else {
258        println!("{:#?}", resp.unwrap_err());
259    }
260}
Source

pub fn description(self, value: String) -> Self

Examples found in repository?
examples/v2_app-builder_CreateApp.rs (lines 174-176)
36async fn main() {
37    let body =
38        CreateAppRequest
39        ::new().data(
40            CreateAppRequestData::new(
41                AppDefinitionType::APPDEFINITIONS,
42            ).attributes(
43                CreateAppRequestDataAttributes::new()
44                    .components(
45                        vec![
46                            ComponentGrid::new(
47                                "grid0".to_string(),
48                                ComponentGridProperties::new()
49                                    .background_color("default".to_string())
50                                    .children(
51                                        vec![
52                                            Component::new(
53                                                "gridCell0".to_string(),
54                                                ComponentProperties::new()
55                                                    .children(
56                                                        vec![
57                                                            Component::new(
58                                                                "text0".to_string(),
59                                                                ComponentProperties
60                                                                ::new().is_visible(
61                                                                    ComponentPropertiesIsVisible::Bool(true),
62                                                                ),
63                                                                ComponentType::TEXT,
64                                                            ).events(vec![])
65                                                        ],
66                                                    )
67                                                    .is_visible(
68                                                        ComponentPropertiesIsVisible::String("true".to_string()),
69                                                    ),
70                                                ComponentType::GRIDCELL,
71                                            ).events(vec![]),
72                                            Component::new(
73                                                "gridCell2".to_string(),
74                                                ComponentProperties::new()
75                                                    .children(
76                                                        vec![
77                                                            Component::new(
78                                                                "table0".to_string(),
79                                                                ComponentProperties
80                                                                ::new().is_visible(
81                                                                    ComponentPropertiesIsVisible::Bool(true),
82                                                                ),
83                                                                ComponentType::TABLE,
84                                                            ).events(vec![])
85                                                        ],
86                                                    )
87                                                    .is_visible(
88                                                        ComponentPropertiesIsVisible::String("true".to_string()),
89                                                    ),
90                                                ComponentType::GRIDCELL,
91                                            ).events(vec![]),
92                                            Component::new(
93                                                "gridCell1".to_string(),
94                                                ComponentProperties::new()
95                                                    .children(
96                                                        vec![
97                                                            Component::new(
98                                                                "text1".to_string(),
99                                                                ComponentProperties
100                                                                ::new().is_visible(
101                                                                    ComponentPropertiesIsVisible::Bool(true),
102                                                                ),
103                                                                ComponentType::TEXT,
104                                                            ).events(vec![])
105                                                        ],
106                                                    )
107                                                    .is_visible(
108                                                        ComponentPropertiesIsVisible::String("true".to_string()),
109                                                    ),
110                                                ComponentType::GRIDCELL,
111                                            ).events(vec![]),
112                                            Component::new(
113                                                "gridCell3".to_string(),
114                                                ComponentProperties::new()
115                                                    .children(
116                                                        vec![
117                                                            Component::new(
118                                                                "button0".to_string(),
119                                                                ComponentProperties
120                                                                ::new().is_visible(
121                                                                    ComponentPropertiesIsVisible::Bool(true),
122                                                                ),
123                                                                ComponentType::BUTTON,
124                                                            ).events(
125                                                                vec![
126                                                                    AppBuilderEvent::new()
127                                                                        .name(AppBuilderEventName::CLICK)
128                                                                        .type_(
129                                                                            AppBuilderEventType::SETSTATEVARIABLEVALUE,
130                                                                        )
131                                                                ],
132                                                            )
133                                                        ],
134                                                    )
135                                                    .is_visible(
136                                                        ComponentPropertiesIsVisible::String("true".to_string()),
137                                                    ),
138                                                ComponentType::GRIDCELL,
139                                            ).events(vec![]),
140                                            Component::new(
141                                                "gridCell4".to_string(),
142                                                ComponentProperties::new()
143                                                    .children(
144                                                        vec![
145                                                            Component::new(
146                                                                "button1".to_string(),
147                                                                ComponentProperties
148                                                                ::new().is_visible(
149                                                                    ComponentPropertiesIsVisible::Bool(true),
150                                                                ),
151                                                                ComponentType::BUTTON,
152                                                            ).events(
153                                                                vec![
154                                                                    AppBuilderEvent::new()
155                                                                        .name(AppBuilderEventName::CLICK)
156                                                                        .type_(
157                                                                            AppBuilderEventType::SETSTATEVARIABLEVALUE,
158                                                                        )
159                                                                ],
160                                                            )
161                                                        ],
162                                                    )
163                                                    .is_visible(
164                                                        ComponentPropertiesIsVisible::String("true".to_string()),
165                                                    ),
166                                                ComponentType::GRIDCELL,
167                                            ).events(vec![])
168                                        ],
169                                    ),
170                                ComponentGridType::GRID,
171                            ).events(vec![])
172                        ],
173                    )
174                    .description(
175                        "This is a slightly complicated example app that fetches and displays cat facts".to_string(),
176                    )
177                    .name("Example Cat Facts Viewer".to_string())
178                    .queries(
179                        vec![
180                            Query::ActionQuery(
181                                Box::new(
182                                    ActionQuery::new(
183                                        Uuid::parse_str(
184                                            "92ff0bb8-553b-4f31-87c7-ef5bd16d47d5",
185                                        ).expect("invalid UUID"),
186                                        "fetchFacts".to_string(),
187                                        ActionQueryProperties::new(
188                                            ActionQuerySpec::ActionQuerySpecObject(
189                                                Box::new(
190                                                    ActionQuerySpecObject::new(
191                                                        "com.datadoghq.http.request".to_string(),
192                                                    )
193                                                        .connection_id(
194                                                            "5e63f4a8-4ce6-47de-ba11-f6617c1d54f3".to_string(),
195                                                        )
196                                                        .inputs(
197                                                            ActionQuerySpecInputs::ActionQuerySpecInput(
198                                                                BTreeMap::from(
199                                                                    [
200                                                                        ("verb".to_string(), Value::from("GET")),
201                                                                        (
202                                                                            "url".to_string(),
203                                                                            Value::from(
204                                                                                "https://catfact.ninja/facts",
205                                                                            ),
206                                                                        ),
207                                                                    ],
208                                                                ),
209                                                            ),
210                                                        ),
211                                                ),
212                                            ),
213                                        ),
214                                        ActionQueryType::ACTION,
215                                    ).events(vec![]),
216                                ),
217                            ),
218                            Query::StateVariable(
219                                Box::new(
220                                    StateVariable::new(
221                                        Uuid::parse_str(
222                                            "afd03c81-4075-4432-8618-ba09d52d2f2d",
223                                        ).expect("invalid UUID"),
224                                        "pageSize".to_string(),
225                                        StateVariableProperties::new().default_value(Value::from("${20}")),
226                                        StateVariableType::STATEVARIABLE,
227                                    ),
228                                ),
229                            ),
230                            Query::DataTransform(
231                                Box::new(
232                                    DataTransform::new(
233                                        Uuid::parse_str(
234                                            "0fb22859-47dc-4137-9e41-7b67d04c525c",
235                                        ).expect("invalid UUID"),
236                                        "randomFact".to_string(),
237                                        DataTransformProperties
238                                        ::new().outputs(
239                                            r#"${(() => {const facts = fetchFacts.outputs.body.data
240return facts[Math.floor(Math.random()*facts.length)]
241})()}"#.to_string(),
242                                        ),
243                                        DataTransformType::DATATRANSFORM,
244                                    ),
245                                ),
246                            )
247                        ],
248                    )
249                    .root_instance_name("grid0".to_string()),
250            ),
251        );
252    let configuration = datadog::Configuration::new();
253    let api = AppBuilderAPI::with_config(configuration);
254    let resp = api.create_app(body).await;
255    if let Ok(value) = resp {
256        println!("{:#?}", value);
257    } else {
258        println!("{:#?}", resp.unwrap_err());
259    }
260}
Source

pub fn name(self, value: String) -> Self

Examples found in repository?
examples/v2_app-builder_CreateApp.rs (line 177)
36async fn main() {
37    let body =
38        CreateAppRequest
39        ::new().data(
40            CreateAppRequestData::new(
41                AppDefinitionType::APPDEFINITIONS,
42            ).attributes(
43                CreateAppRequestDataAttributes::new()
44                    .components(
45                        vec![
46                            ComponentGrid::new(
47                                "grid0".to_string(),
48                                ComponentGridProperties::new()
49                                    .background_color("default".to_string())
50                                    .children(
51                                        vec![
52                                            Component::new(
53                                                "gridCell0".to_string(),
54                                                ComponentProperties::new()
55                                                    .children(
56                                                        vec![
57                                                            Component::new(
58                                                                "text0".to_string(),
59                                                                ComponentProperties
60                                                                ::new().is_visible(
61                                                                    ComponentPropertiesIsVisible::Bool(true),
62                                                                ),
63                                                                ComponentType::TEXT,
64                                                            ).events(vec![])
65                                                        ],
66                                                    )
67                                                    .is_visible(
68                                                        ComponentPropertiesIsVisible::String("true".to_string()),
69                                                    ),
70                                                ComponentType::GRIDCELL,
71                                            ).events(vec![]),
72                                            Component::new(
73                                                "gridCell2".to_string(),
74                                                ComponentProperties::new()
75                                                    .children(
76                                                        vec![
77                                                            Component::new(
78                                                                "table0".to_string(),
79                                                                ComponentProperties
80                                                                ::new().is_visible(
81                                                                    ComponentPropertiesIsVisible::Bool(true),
82                                                                ),
83                                                                ComponentType::TABLE,
84                                                            ).events(vec![])
85                                                        ],
86                                                    )
87                                                    .is_visible(
88                                                        ComponentPropertiesIsVisible::String("true".to_string()),
89                                                    ),
90                                                ComponentType::GRIDCELL,
91                                            ).events(vec![]),
92                                            Component::new(
93                                                "gridCell1".to_string(),
94                                                ComponentProperties::new()
95                                                    .children(
96                                                        vec![
97                                                            Component::new(
98                                                                "text1".to_string(),
99                                                                ComponentProperties
100                                                                ::new().is_visible(
101                                                                    ComponentPropertiesIsVisible::Bool(true),
102                                                                ),
103                                                                ComponentType::TEXT,
104                                                            ).events(vec![])
105                                                        ],
106                                                    )
107                                                    .is_visible(
108                                                        ComponentPropertiesIsVisible::String("true".to_string()),
109                                                    ),
110                                                ComponentType::GRIDCELL,
111                                            ).events(vec![]),
112                                            Component::new(
113                                                "gridCell3".to_string(),
114                                                ComponentProperties::new()
115                                                    .children(
116                                                        vec![
117                                                            Component::new(
118                                                                "button0".to_string(),
119                                                                ComponentProperties
120                                                                ::new().is_visible(
121                                                                    ComponentPropertiesIsVisible::Bool(true),
122                                                                ),
123                                                                ComponentType::BUTTON,
124                                                            ).events(
125                                                                vec![
126                                                                    AppBuilderEvent::new()
127                                                                        .name(AppBuilderEventName::CLICK)
128                                                                        .type_(
129                                                                            AppBuilderEventType::SETSTATEVARIABLEVALUE,
130                                                                        )
131                                                                ],
132                                                            )
133                                                        ],
134                                                    )
135                                                    .is_visible(
136                                                        ComponentPropertiesIsVisible::String("true".to_string()),
137                                                    ),
138                                                ComponentType::GRIDCELL,
139                                            ).events(vec![]),
140                                            Component::new(
141                                                "gridCell4".to_string(),
142                                                ComponentProperties::new()
143                                                    .children(
144                                                        vec![
145                                                            Component::new(
146                                                                "button1".to_string(),
147                                                                ComponentProperties
148                                                                ::new().is_visible(
149                                                                    ComponentPropertiesIsVisible::Bool(true),
150                                                                ),
151                                                                ComponentType::BUTTON,
152                                                            ).events(
153                                                                vec![
154                                                                    AppBuilderEvent::new()
155                                                                        .name(AppBuilderEventName::CLICK)
156                                                                        .type_(
157                                                                            AppBuilderEventType::SETSTATEVARIABLEVALUE,
158                                                                        )
159                                                                ],
160                                                            )
161                                                        ],
162                                                    )
163                                                    .is_visible(
164                                                        ComponentPropertiesIsVisible::String("true".to_string()),
165                                                    ),
166                                                ComponentType::GRIDCELL,
167                                            ).events(vec![])
168                                        ],
169                                    ),
170                                ComponentGridType::GRID,
171                            ).events(vec![])
172                        ],
173                    )
174                    .description(
175                        "This is a slightly complicated example app that fetches and displays cat facts".to_string(),
176                    )
177                    .name("Example Cat Facts Viewer".to_string())
178                    .queries(
179                        vec![
180                            Query::ActionQuery(
181                                Box::new(
182                                    ActionQuery::new(
183                                        Uuid::parse_str(
184                                            "92ff0bb8-553b-4f31-87c7-ef5bd16d47d5",
185                                        ).expect("invalid UUID"),
186                                        "fetchFacts".to_string(),
187                                        ActionQueryProperties::new(
188                                            ActionQuerySpec::ActionQuerySpecObject(
189                                                Box::new(
190                                                    ActionQuerySpecObject::new(
191                                                        "com.datadoghq.http.request".to_string(),
192                                                    )
193                                                        .connection_id(
194                                                            "5e63f4a8-4ce6-47de-ba11-f6617c1d54f3".to_string(),
195                                                        )
196                                                        .inputs(
197                                                            ActionQuerySpecInputs::ActionQuerySpecInput(
198                                                                BTreeMap::from(
199                                                                    [
200                                                                        ("verb".to_string(), Value::from("GET")),
201                                                                        (
202                                                                            "url".to_string(),
203                                                                            Value::from(
204                                                                                "https://catfact.ninja/facts",
205                                                                            ),
206                                                                        ),
207                                                                    ],
208                                                                ),
209                                                            ),
210                                                        ),
211                                                ),
212                                            ),
213                                        ),
214                                        ActionQueryType::ACTION,
215                                    ).events(vec![]),
216                                ),
217                            ),
218                            Query::StateVariable(
219                                Box::new(
220                                    StateVariable::new(
221                                        Uuid::parse_str(
222                                            "afd03c81-4075-4432-8618-ba09d52d2f2d",
223                                        ).expect("invalid UUID"),
224                                        "pageSize".to_string(),
225                                        StateVariableProperties::new().default_value(Value::from("${20}")),
226                                        StateVariableType::STATEVARIABLE,
227                                    ),
228                                ),
229                            ),
230                            Query::DataTransform(
231                                Box::new(
232                                    DataTransform::new(
233                                        Uuid::parse_str(
234                                            "0fb22859-47dc-4137-9e41-7b67d04c525c",
235                                        ).expect("invalid UUID"),
236                                        "randomFact".to_string(),
237                                        DataTransformProperties
238                                        ::new().outputs(
239                                            r#"${(() => {const facts = fetchFacts.outputs.body.data
240return facts[Math.floor(Math.random()*facts.length)]
241})()}"#.to_string(),
242                                        ),
243                                        DataTransformType::DATATRANSFORM,
244                                    ),
245                                ),
246                            )
247                        ],
248                    )
249                    .root_instance_name("grid0".to_string()),
250            ),
251        );
252    let configuration = datadog::Configuration::new();
253    let api = AppBuilderAPI::with_config(configuration);
254    let resp = api.create_app(body).await;
255    if let Ok(value) = resp {
256        println!("{:#?}", value);
257    } else {
258        println!("{:#?}", resp.unwrap_err());
259    }
260}
Source

pub fn queries(self, value: Vec<Query>) -> Self

Examples found in repository?
examples/v2_app-builder_CreateApp.rs (lines 178-248)
36async fn main() {
37    let body =
38        CreateAppRequest
39        ::new().data(
40            CreateAppRequestData::new(
41                AppDefinitionType::APPDEFINITIONS,
42            ).attributes(
43                CreateAppRequestDataAttributes::new()
44                    .components(
45                        vec![
46                            ComponentGrid::new(
47                                "grid0".to_string(),
48                                ComponentGridProperties::new()
49                                    .background_color("default".to_string())
50                                    .children(
51                                        vec![
52                                            Component::new(
53                                                "gridCell0".to_string(),
54                                                ComponentProperties::new()
55                                                    .children(
56                                                        vec![
57                                                            Component::new(
58                                                                "text0".to_string(),
59                                                                ComponentProperties
60                                                                ::new().is_visible(
61                                                                    ComponentPropertiesIsVisible::Bool(true),
62                                                                ),
63                                                                ComponentType::TEXT,
64                                                            ).events(vec![])
65                                                        ],
66                                                    )
67                                                    .is_visible(
68                                                        ComponentPropertiesIsVisible::String("true".to_string()),
69                                                    ),
70                                                ComponentType::GRIDCELL,
71                                            ).events(vec![]),
72                                            Component::new(
73                                                "gridCell2".to_string(),
74                                                ComponentProperties::new()
75                                                    .children(
76                                                        vec![
77                                                            Component::new(
78                                                                "table0".to_string(),
79                                                                ComponentProperties
80                                                                ::new().is_visible(
81                                                                    ComponentPropertiesIsVisible::Bool(true),
82                                                                ),
83                                                                ComponentType::TABLE,
84                                                            ).events(vec![])
85                                                        ],
86                                                    )
87                                                    .is_visible(
88                                                        ComponentPropertiesIsVisible::String("true".to_string()),
89                                                    ),
90                                                ComponentType::GRIDCELL,
91                                            ).events(vec![]),
92                                            Component::new(
93                                                "gridCell1".to_string(),
94                                                ComponentProperties::new()
95                                                    .children(
96                                                        vec![
97                                                            Component::new(
98                                                                "text1".to_string(),
99                                                                ComponentProperties
100                                                                ::new().is_visible(
101                                                                    ComponentPropertiesIsVisible::Bool(true),
102                                                                ),
103                                                                ComponentType::TEXT,
104                                                            ).events(vec![])
105                                                        ],
106                                                    )
107                                                    .is_visible(
108                                                        ComponentPropertiesIsVisible::String("true".to_string()),
109                                                    ),
110                                                ComponentType::GRIDCELL,
111                                            ).events(vec![]),
112                                            Component::new(
113                                                "gridCell3".to_string(),
114                                                ComponentProperties::new()
115                                                    .children(
116                                                        vec![
117                                                            Component::new(
118                                                                "button0".to_string(),
119                                                                ComponentProperties
120                                                                ::new().is_visible(
121                                                                    ComponentPropertiesIsVisible::Bool(true),
122                                                                ),
123                                                                ComponentType::BUTTON,
124                                                            ).events(
125                                                                vec![
126                                                                    AppBuilderEvent::new()
127                                                                        .name(AppBuilderEventName::CLICK)
128                                                                        .type_(
129                                                                            AppBuilderEventType::SETSTATEVARIABLEVALUE,
130                                                                        )
131                                                                ],
132                                                            )
133                                                        ],
134                                                    )
135                                                    .is_visible(
136                                                        ComponentPropertiesIsVisible::String("true".to_string()),
137                                                    ),
138                                                ComponentType::GRIDCELL,
139                                            ).events(vec![]),
140                                            Component::new(
141                                                "gridCell4".to_string(),
142                                                ComponentProperties::new()
143                                                    .children(
144                                                        vec![
145                                                            Component::new(
146                                                                "button1".to_string(),
147                                                                ComponentProperties
148                                                                ::new().is_visible(
149                                                                    ComponentPropertiesIsVisible::Bool(true),
150                                                                ),
151                                                                ComponentType::BUTTON,
152                                                            ).events(
153                                                                vec![
154                                                                    AppBuilderEvent::new()
155                                                                        .name(AppBuilderEventName::CLICK)
156                                                                        .type_(
157                                                                            AppBuilderEventType::SETSTATEVARIABLEVALUE,
158                                                                        )
159                                                                ],
160                                                            )
161                                                        ],
162                                                    )
163                                                    .is_visible(
164                                                        ComponentPropertiesIsVisible::String("true".to_string()),
165                                                    ),
166                                                ComponentType::GRIDCELL,
167                                            ).events(vec![])
168                                        ],
169                                    ),
170                                ComponentGridType::GRID,
171                            ).events(vec![])
172                        ],
173                    )
174                    .description(
175                        "This is a slightly complicated example app that fetches and displays cat facts".to_string(),
176                    )
177                    .name("Example Cat Facts Viewer".to_string())
178                    .queries(
179                        vec![
180                            Query::ActionQuery(
181                                Box::new(
182                                    ActionQuery::new(
183                                        Uuid::parse_str(
184                                            "92ff0bb8-553b-4f31-87c7-ef5bd16d47d5",
185                                        ).expect("invalid UUID"),
186                                        "fetchFacts".to_string(),
187                                        ActionQueryProperties::new(
188                                            ActionQuerySpec::ActionQuerySpecObject(
189                                                Box::new(
190                                                    ActionQuerySpecObject::new(
191                                                        "com.datadoghq.http.request".to_string(),
192                                                    )
193                                                        .connection_id(
194                                                            "5e63f4a8-4ce6-47de-ba11-f6617c1d54f3".to_string(),
195                                                        )
196                                                        .inputs(
197                                                            ActionQuerySpecInputs::ActionQuerySpecInput(
198                                                                BTreeMap::from(
199                                                                    [
200                                                                        ("verb".to_string(), Value::from("GET")),
201                                                                        (
202                                                                            "url".to_string(),
203                                                                            Value::from(
204                                                                                "https://catfact.ninja/facts",
205                                                                            ),
206                                                                        ),
207                                                                    ],
208                                                                ),
209                                                            ),
210                                                        ),
211                                                ),
212                                            ),
213                                        ),
214                                        ActionQueryType::ACTION,
215                                    ).events(vec![]),
216                                ),
217                            ),
218                            Query::StateVariable(
219                                Box::new(
220                                    StateVariable::new(
221                                        Uuid::parse_str(
222                                            "afd03c81-4075-4432-8618-ba09d52d2f2d",
223                                        ).expect("invalid UUID"),
224                                        "pageSize".to_string(),
225                                        StateVariableProperties::new().default_value(Value::from("${20}")),
226                                        StateVariableType::STATEVARIABLE,
227                                    ),
228                                ),
229                            ),
230                            Query::DataTransform(
231                                Box::new(
232                                    DataTransform::new(
233                                        Uuid::parse_str(
234                                            "0fb22859-47dc-4137-9e41-7b67d04c525c",
235                                        ).expect("invalid UUID"),
236                                        "randomFact".to_string(),
237                                        DataTransformProperties
238                                        ::new().outputs(
239                                            r#"${(() => {const facts = fetchFacts.outputs.body.data
240return facts[Math.floor(Math.random()*facts.length)]
241})()}"#.to_string(),
242                                        ),
243                                        DataTransformType::DATATRANSFORM,
244                                    ),
245                                ),
246                            )
247                        ],
248                    )
249                    .root_instance_name("grid0".to_string()),
250            ),
251        );
252    let configuration = datadog::Configuration::new();
253    let api = AppBuilderAPI::with_config(configuration);
254    let resp = api.create_app(body).await;
255    if let Ok(value) = resp {
256        println!("{:#?}", value);
257    } else {
258        println!("{:#?}", resp.unwrap_err());
259    }
260}
Source

pub fn root_instance_name(self, value: String) -> Self

Examples found in repository?
examples/v2_app-builder_CreateApp.rs (line 249)
36async fn main() {
37    let body =
38        CreateAppRequest
39        ::new().data(
40            CreateAppRequestData::new(
41                AppDefinitionType::APPDEFINITIONS,
42            ).attributes(
43                CreateAppRequestDataAttributes::new()
44                    .components(
45                        vec![
46                            ComponentGrid::new(
47                                "grid0".to_string(),
48                                ComponentGridProperties::new()
49                                    .background_color("default".to_string())
50                                    .children(
51                                        vec![
52                                            Component::new(
53                                                "gridCell0".to_string(),
54                                                ComponentProperties::new()
55                                                    .children(
56                                                        vec![
57                                                            Component::new(
58                                                                "text0".to_string(),
59                                                                ComponentProperties
60                                                                ::new().is_visible(
61                                                                    ComponentPropertiesIsVisible::Bool(true),
62                                                                ),
63                                                                ComponentType::TEXT,
64                                                            ).events(vec![])
65                                                        ],
66                                                    )
67                                                    .is_visible(
68                                                        ComponentPropertiesIsVisible::String("true".to_string()),
69                                                    ),
70                                                ComponentType::GRIDCELL,
71                                            ).events(vec![]),
72                                            Component::new(
73                                                "gridCell2".to_string(),
74                                                ComponentProperties::new()
75                                                    .children(
76                                                        vec![
77                                                            Component::new(
78                                                                "table0".to_string(),
79                                                                ComponentProperties
80                                                                ::new().is_visible(
81                                                                    ComponentPropertiesIsVisible::Bool(true),
82                                                                ),
83                                                                ComponentType::TABLE,
84                                                            ).events(vec![])
85                                                        ],
86                                                    )
87                                                    .is_visible(
88                                                        ComponentPropertiesIsVisible::String("true".to_string()),
89                                                    ),
90                                                ComponentType::GRIDCELL,
91                                            ).events(vec![]),
92                                            Component::new(
93                                                "gridCell1".to_string(),
94                                                ComponentProperties::new()
95                                                    .children(
96                                                        vec![
97                                                            Component::new(
98                                                                "text1".to_string(),
99                                                                ComponentProperties
100                                                                ::new().is_visible(
101                                                                    ComponentPropertiesIsVisible::Bool(true),
102                                                                ),
103                                                                ComponentType::TEXT,
104                                                            ).events(vec![])
105                                                        ],
106                                                    )
107                                                    .is_visible(
108                                                        ComponentPropertiesIsVisible::String("true".to_string()),
109                                                    ),
110                                                ComponentType::GRIDCELL,
111                                            ).events(vec![]),
112                                            Component::new(
113                                                "gridCell3".to_string(),
114                                                ComponentProperties::new()
115                                                    .children(
116                                                        vec![
117                                                            Component::new(
118                                                                "button0".to_string(),
119                                                                ComponentProperties
120                                                                ::new().is_visible(
121                                                                    ComponentPropertiesIsVisible::Bool(true),
122                                                                ),
123                                                                ComponentType::BUTTON,
124                                                            ).events(
125                                                                vec![
126                                                                    AppBuilderEvent::new()
127                                                                        .name(AppBuilderEventName::CLICK)
128                                                                        .type_(
129                                                                            AppBuilderEventType::SETSTATEVARIABLEVALUE,
130                                                                        )
131                                                                ],
132                                                            )
133                                                        ],
134                                                    )
135                                                    .is_visible(
136                                                        ComponentPropertiesIsVisible::String("true".to_string()),
137                                                    ),
138                                                ComponentType::GRIDCELL,
139                                            ).events(vec![]),
140                                            Component::new(
141                                                "gridCell4".to_string(),
142                                                ComponentProperties::new()
143                                                    .children(
144                                                        vec![
145                                                            Component::new(
146                                                                "button1".to_string(),
147                                                                ComponentProperties
148                                                                ::new().is_visible(
149                                                                    ComponentPropertiesIsVisible::Bool(true),
150                                                                ),
151                                                                ComponentType::BUTTON,
152                                                            ).events(
153                                                                vec![
154                                                                    AppBuilderEvent::new()
155                                                                        .name(AppBuilderEventName::CLICK)
156                                                                        .type_(
157                                                                            AppBuilderEventType::SETSTATEVARIABLEVALUE,
158                                                                        )
159                                                                ],
160                                                            )
161                                                        ],
162                                                    )
163                                                    .is_visible(
164                                                        ComponentPropertiesIsVisible::String("true".to_string()),
165                                                    ),
166                                                ComponentType::GRIDCELL,
167                                            ).events(vec![])
168                                        ],
169                                    ),
170                                ComponentGridType::GRID,
171                            ).events(vec![])
172                        ],
173                    )
174                    .description(
175                        "This is a slightly complicated example app that fetches and displays cat facts".to_string(),
176                    )
177                    .name("Example Cat Facts Viewer".to_string())
178                    .queries(
179                        vec![
180                            Query::ActionQuery(
181                                Box::new(
182                                    ActionQuery::new(
183                                        Uuid::parse_str(
184                                            "92ff0bb8-553b-4f31-87c7-ef5bd16d47d5",
185                                        ).expect("invalid UUID"),
186                                        "fetchFacts".to_string(),
187                                        ActionQueryProperties::new(
188                                            ActionQuerySpec::ActionQuerySpecObject(
189                                                Box::new(
190                                                    ActionQuerySpecObject::new(
191                                                        "com.datadoghq.http.request".to_string(),
192                                                    )
193                                                        .connection_id(
194                                                            "5e63f4a8-4ce6-47de-ba11-f6617c1d54f3".to_string(),
195                                                        )
196                                                        .inputs(
197                                                            ActionQuerySpecInputs::ActionQuerySpecInput(
198                                                                BTreeMap::from(
199                                                                    [
200                                                                        ("verb".to_string(), Value::from("GET")),
201                                                                        (
202                                                                            "url".to_string(),
203                                                                            Value::from(
204                                                                                "https://catfact.ninja/facts",
205                                                                            ),
206                                                                        ),
207                                                                    ],
208                                                                ),
209                                                            ),
210                                                        ),
211                                                ),
212                                            ),
213                                        ),
214                                        ActionQueryType::ACTION,
215                                    ).events(vec![]),
216                                ),
217                            ),
218                            Query::StateVariable(
219                                Box::new(
220                                    StateVariable::new(
221                                        Uuid::parse_str(
222                                            "afd03c81-4075-4432-8618-ba09d52d2f2d",
223                                        ).expect("invalid UUID"),
224                                        "pageSize".to_string(),
225                                        StateVariableProperties::new().default_value(Value::from("${20}")),
226                                        StateVariableType::STATEVARIABLE,
227                                    ),
228                                ),
229                            ),
230                            Query::DataTransform(
231                                Box::new(
232                                    DataTransform::new(
233                                        Uuid::parse_str(
234                                            "0fb22859-47dc-4137-9e41-7b67d04c525c",
235                                        ).expect("invalid UUID"),
236                                        "randomFact".to_string(),
237                                        DataTransformProperties
238                                        ::new().outputs(
239                                            r#"${(() => {const facts = fetchFacts.outputs.body.data
240return facts[Math.floor(Math.random()*facts.length)]
241})()}"#.to_string(),
242                                        ),
243                                        DataTransformType::DATATRANSFORM,
244                                    ),
245                                ),
246                            )
247                        ],
248                    )
249                    .root_instance_name("grid0".to_string()),
250            ),
251        );
252    let configuration = datadog::Configuration::new();
253    let api = AppBuilderAPI::with_config(configuration);
254    let resp = api.create_app(body).await;
255    if let Ok(value) = resp {
256        println!("{:#?}", value);
257    } else {
258        println!("{:#?}", resp.unwrap_err());
259    }
260}
Source

pub fn tags(self, value: Vec<String>) -> Self

Source

pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self

Trait Implementations§

Source§

impl Clone for CreateAppRequestDataAttributes

Source§

fn clone(&self) -> CreateAppRequestDataAttributes

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CreateAppRequestDataAttributes

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CreateAppRequestDataAttributes

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CreateAppRequestDataAttributes

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for CreateAppRequestDataAttributes

Source§

fn eq(&self, other: &CreateAppRequestDataAttributes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for CreateAppRequestDataAttributes

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CreateAppRequestDataAttributes

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,