ros2_interfaces_rolling/rosidl_generator_py/msg/
string_arrays.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct StringArrays {
5    pub ub_string_static_array_value: [::std::string::String; 3],
6    pub ub_string_ub_array_value: Vec<::std::string::String>,
7    pub ub_string_dynamic_array_value: Vec<::std::string::String>,
8    pub string_dynamic_array_value: Vec<::std::string::String>,
9    pub string_static_array_value: [::std::string::String; 3],
10    pub string_bounded_array_value: Vec<::std::string::String>,
11    pub def_string_dynamic_array_value: Vec<::std::string::String>, // default: ["What", "a", "wonderful", "world", "!"]
12    pub def_string_static_array_value: [::std::string::String; 3], // default: ["Hello", "World", "!"]
13    pub def_string_bounded_array_value: Vec<::std::string::String>, // default: ['Hello', 'World', "!"]
14    pub def_various_quotes: Vec<::std::string::String>, // default: ["H\"el'lo", 'Wo\'r"ld']
15    pub def_various_commas: Vec<::std::string::String>, // default: ["Hel,lo", ',World', abcd , "!,",]
16}
17
18impl Default for StringArrays {
19    fn default() -> Self {
20        StringArrays {
21            ub_string_static_array_value: core::array::from_fn(|_| ::std::string::String::default()),
22            ub_string_ub_array_value: Vec::new(),
23            ub_string_dynamic_array_value: Vec::new(),
24            string_dynamic_array_value: Vec::new(),
25            string_static_array_value: core::array::from_fn(|_| ::std::string::String::default()),
26            string_bounded_array_value: Vec::new(),
27            def_string_dynamic_array_value: vec![::std::string::String::from("What"), ::std::string::String::from("a"), ::std::string::String::from("wonderful"), ::std::string::String::from("world"), ::std::string::String::from("!")],
28            def_string_static_array_value: [::std::string::String::from("Hello"), ::std::string::String::from("World"), ::std::string::String::from("!")],
29            def_string_bounded_array_value: vec![::std::string::String::from("Hello"), ::std::string::String::from("World"), ::std::string::String::from("!")],
30            def_various_quotes: vec![::std::string::String::from("H\\\"el'lo"), ::std::string::String::from("Wo\\'r\"ld")],
31            def_various_commas: vec![::std::string::String::from("Hel"), ::std::string::String::from("lo"), ::std::string::String::from(""), ::std::string::String::from("World"), ::std::string::String::from("abcd"), ::std::string::String::from("!"), ::std::string::String::from(""), ::std::string::String::from("")],
32        }
33    }
34}
35
36impl ros2_client::Message for StringArrays {}